Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Markech
refinerycms-photo-gallery
Commits
8e62ea74
Commit
8e62ea74
authored
Oct 04, 2012
by
Martin Markech
Browse files
when delete page, destroy connection to album
parent
a22183b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/refinery/photo_gallery/extensions/pages_extension.rb
View file @
8e62ea74
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment