Class: SpudPhotoGallery
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SpudPhotoGallery
- Defined in:
- app/models/spud_photo_gallery.rb
Instance Method Summary collapse
Instance Method Details
#albums_available ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/models/spud_photo_gallery.rb', line 20 def albums_available if album_ids.any? return SpudPhotoAlbum.where('id not in (?)', album_ids) else return SpudPhotoAlbum.all end end |
#top_photo_url(style) ⇒ Object
14 15 16 17 18 |
# File 'app/models/spud_photo_gallery.rb', line 14 def top_photo_url(style) unless albums.empty? return albums.first.top_photo_url(style) end end |