From a75dfb0201cb4fbfc6638b7ba1e5e878b9c77934 Mon Sep 17 00:00:00 2001 From: ilya Date: Wed, 21 Jul 2010 18:27:18 -0700 Subject: [PATCH] Album retractions --- app/models/album.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/album.rb b/app/models/album.rb index c62823634..3f993a9bf 100644 --- a/app/models/album.rb +++ b/app/models/album.rb @@ -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