Sha256: 41850e783711321cd45dbb68d9653ebc8804b4d77bb31ed96832f0f944ad902d

Contents?: true

Size: 449 Bytes

Versions: 16

Compression:

Stored size: 449 Bytes

Contents

module Spree
  class TaxonImage < Asset
    include Configuration::ActiveStorage
    include Rails.application.routes.url_helpers
    include ::Spree::ImageMethods

    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
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
spree_core-4.6.6 app/models/spree/taxon_image.rb
spree_core-4.5.5 app/models/spree/taxon_image.rb
spree_core-4.5.4 app/models/spree/taxon_image.rb
spree_core-4.6.5 app/models/spree/taxon_image.rb
spree_core-4.7.2 app/models/spree/taxon_image.rb
spree_core-4.7.1 app/models/spree/taxon_image.rb
spree_core-4.6.4 app/models/spree/taxon_image.rb
spree_core-4.7.0 app/models/spree/taxon_image.rb
spree_core-4.6.3 app/models/spree/taxon_image.rb
spree_core-4.6.2 app/models/spree/taxon_image.rb
spree_core-4.6.1 app/models/spree/taxon_image.rb
spree_core-4.6.0 app/models/spree/taxon_image.rb
spree_core-4.5.3 app/models/spree/taxon_image.rb
spree_core-4.5.2 app/models/spree/taxon_image.rb
spree_core-4.5.1 app/models/spree/taxon_image.rb
spree_core-4.5.0 app/models/spree/taxon_image.rb