Sha256: 9ad83ae4a2a199955eea6ff6a4c9001c49b0d02818345a4cbfbbda6cd7a4dde3

Contents?: true

Size: 827 Bytes

Versions: 19

Compression:

Stored size: 827 Bytes

Contents

module Spree
  class TaxonImage < Asset
    module Configuration
      module Paperclip
        extend ActiveSupport::Concern

        included do
          def self.styles
            attachment_definitions[:attachment][:styles]
          end

          delegate :url, to: :attachment

          has_attached_file :attachment,
            styles: { mini: '32x32>', normal: '128x128>' },
            default_style: :mini,
            url: '/spree/taxons/:viewable_id/:style/:basename.:extension',
            path: ':rails_root/public/spree/taxons/:viewable_id/:style/:basename.:extension',
            default_url: '/assets/default_taxon.png'

          validates_attachment :attachment,
            content_type: { content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'] }
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
spree_core-3.7.14.1 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.14 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.13 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.12 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.11 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.10 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.9 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.8 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.7 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.6 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.5 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.4 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.3 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.2 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.1 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.0 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.0.rc3 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.0.rc2 app/models/spree/taxon_image/configuration/paperclip.rb
spree_core-3.7.0.rc1 app/models/spree/taxon_image/configuration/paperclip.rb