Class: SpreeCmCommissioner::Asset
- Inherits:
-
Spree::Asset
- Object
- Spree::Asset
- SpreeCmCommissioner::Asset
- Includes:
- Spree::Image::Configuration::ActiveStorage, Spree::ImageMethods
- Defined in:
- app/models/spree_cm_commissioner/asset.rb
Direct Known Subclasses
BackImage, FeatureImage, FrontImage, GoogleWalletHero, GoogleWalletLogo, GuestCardClasses::BibCardBackgroundImage, GuestCardClasses::BookingCardBackgroundImage, HomepageBackgroundAppImage, HomepageBackgroundWebImage, HomepageBannerAppImage, HomepageBannerWebImage, TaxonAppBanner, TaxonBrandLogo, TaxonCategoryIcon, TaxonHomeBanner, TaxonWebBanner, UserProfile, VehiclePhoto, VendorAppPromotionBanner, VendorLogo, VendorPaymentQrcode, VendorPhoto, VendorWebPromotionBanner
Instance Method Summary collapse
Instance Method Details
#styles ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/spree_cm_commissioner/asset.rb', line 7 def styles asset_styles.map do |_, size| width, height = size[/(\d+)x(\d+)/].split('x') { url: cdn_image_url(.variant(resize_to_limit: [width.to_i, height.to_i])), width: width, height: height } end end |