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