Pushing Albums out

This commit is contained in:
ilya 2010-07-21 18:26:03 -07:00
parent e23b139495
commit 6b9a3fc518

View file

@ -17,6 +17,7 @@ class Album
validates_presence_of :name
before_destroy :destroy_photos
after_save :notify_people
def prev_photo(photo)
n_photo = self.photos.where(:created_at.lt => photo.created_at).sort(:created_at.desc).first