Class: ActiveadminSelleoCms::Asset
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ActiveadminSelleoCms::Asset
- Defined in:
- app/models/activeadmin_selleo_cms/asset.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cover_height ⇒ Object
Returns the value of attribute cover_height.
-
#cover_resize_method ⇒ Object
Returns the value of attribute cover_resize_method.
-
#cover_width ⇒ Object
Returns the value of attribute cover_width.
Instance Method Summary collapse
Instance Attribute Details
#cover_height ⇒ Object
Returns the value of attribute cover_height.
4 5 6 |
# File 'app/models/activeadmin_selleo_cms/asset.rb', line 4 def cover_height @cover_height end |
#cover_resize_method ⇒ Object
Returns the value of attribute cover_resize_method.
4 5 6 |
# File 'app/models/activeadmin_selleo_cms/asset.rb', line 4 def cover_resize_method @cover_resize_method end |
#cover_width ⇒ Object
Returns the value of attribute cover_width.
4 5 6 |
# File 'app/models/activeadmin_selleo_cms/asset.rb', line 4 def cover_width @cover_width end |
Instance Method Details
#image_sizes ⇒ Object
20 21 22 |
# File 'app/models/activeadmin_selleo_cms/asset.rb', line 20 def image_sizes { :normal => "#{cover_width || 120}x#{cover_height || 90}#{cover_resize_method || ">"}" } end |
#url(format = nil) ⇒ Object
16 17 18 |
# File 'app/models/activeadmin_selleo_cms/asset.rb', line 16 def url(format=nil) data.url(format) end |