Class: Spree::TaxonImage
- Includes:
- ImageMethods, Configuration::ActiveStorage
- Defined in:
- app/models/spree/taxon_image.rb,
app/models/spree/taxon_image/configuration/active_storage.rb
Defined Under Namespace
Modules: Configuration
Constant Summary
Constants inherited from Asset
Asset::EXTERNAL_URL_METAFIELD_KEY
Instance Method Summary collapse
Methods included from ImageMethods
Methods inherited from Asset
#external_url, #external_url=, #product, #skip_import?
Instance Method Details
#styles ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/models/spree/taxon_image.rb', line 7 def styles self.class.styles.map do |_, size| width, height = size[/(\d+)x(\d+)/].split('x').map(&:to_i) { url: generate_url(size: size), size: size, width: width, height: height } end end |