Album retractions
This commit is contained in:
parent
6b9a3fc518
commit
a75dfb0201
1 changed files with 1 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ class Album
|
|||
before_destroy :destroy_photos
|
||||
after_save :notify_people
|
||||
|
||||
before_destroy :propagate_retraction
|
||||
def prev_photo(photo)
|
||||
n_photo = self.photos.where(:created_at.lt => photo.created_at).sort(:created_at.desc).first
|
||||
n_photo ? n_photo : self.photos.sort(:created_at.desc).first
|
||||
|
|
|
|||
Loading…
Reference in a new issue