Class: Spree::Menu
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Spree::Menu
- Includes:
- ActsAsTree
- Defined in:
- app/models/spree/menu.rb
Instance Method Summary collapse
Instance Method Details
#attachment_sizes ⇒ Object
38 39 40 41 42 43 |
# File 'app/models/spree/menu.rb', line 38 def hash = {} hash.merge!(:mini => '48x48>', :greyscale => {:processors => [:grayscale]}) if image_content? hash.merge!(:logo_color => '123x81>', :logo_grey => {:geometry => '123x81>', :processors => [:thumbnail,:grayscale]}) if parent_id.nil? hash end |
#image_content? ⇒ Boolean
34 35 36 |
# File 'app/models/spree/menu.rb', line 34 def image_content? .to_s.match(/\/(jpeg|png|gif|tiff|x-photoshop)/) end |