Commit 8e62ea74 authored by Martin Markech's avatar Martin Markech
Browse files

when delete page, destroy connection to album

parent a22183b4
......@@ -3,7 +3,7 @@ module Refinery
module Extensions
module Pages
def has_one_page_album
has_one :album_page, :as => :page
has_one :album_page, :as => :page, :dependent=> :destroy
has_one :album, :through => :album_page
has_many :photos, :class_name => Refinery::PhotoGallery::Photo, :through => :album , :order=> "created_at ASC"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment