Class: ActiveadminSelleoCms::Asset

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/activeadmin_selleo_cms/asset.rb

Direct Known Subclasses

Attachment, Image

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cover_heightObject

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_methodObject

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_widthObject

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_sizesObject



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