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
17 18 19 20 21 22 23 |
# File 'app/models/spud_photo_gallery.rb', line 17 def albums_available if album_ids.any? SpudPhotoAlbum.where('id not in (?)', album_ids) else SpudPhotoAlbum.all end end |
#top_photo_url(style) ⇒ Object
13 14 15 |
# File 'app/models/spud_photo_gallery.rb', line 13 def top_photo_url(style) return albums.first.top_photo_url(style) unless albums.empty? end |