Class: Gluttonberg::AssetCollection
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Gluttonberg::AssetCollection
- Defined in:
- app/models/gluttonberg/asset_collection.rb
Instance Method Summary collapse
- #images ⇒ Object
-
#name_with_number_of_images ⇒ Object
this method is required for gallery form.
Instance Method Details
#images ⇒ Object
8 9 10 11 |
# File 'app/models/gluttonberg/asset_collection.rb', line 8 def images data = assets.find(:all , :include => :asset_type ) data.find_all{|d| d.category == "image"} end |
#name_with_number_of_images ⇒ Object
this method is required for gallery form
14 15 16 |
# File 'app/models/gluttonberg/asset_collection.rb', line 14 def name_with_number_of_images "#{name} (#{images.length} images)" end |