Module: SpreeCmCommissioner::ImageDecorator
- Defined in:
- app/models/spree_cm_commissioner/image_decorator.rb
Instance Method Summary collapse
- #asset_styles ⇒ Object
-
#styles ⇒ Object
override.
Instance Method Details
#asset_styles ⇒ Object
17 18 19 |
# File 'app/models/spree_cm_commissioner/image_decorator.rb', line 17 def asset_styles self.class.styles.merge({ product_zoomed: '1200x1200>' }) end |
#styles ⇒ Object
override
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/models/spree_cm_commissioner/image_decorator.rb', line 4 def styles size = '1200x1200' width, height = size.split('x') [ { url: cdn_image_url(.variant(resize_to_limit: [width.to_i, height.to_i])), width: width, height: height } ] end |