Sha256: 56a875b4e9522b0696c726385820c09bd4ef6dc384b0ca8036d06eb268faf6af

Contents?: true

Size: 537 Bytes

Versions: 17

Compression:

Stored size: 537 Bytes

Contents

module Spree
  class StoreFaviconImage < Asset
    if Spree.public_storage_service_name
      has_one_attached :attachment, service: Spree.public_storage_service_name
    else
      has_one_attached :attachment
    end

    VALID_CONTENT_TYPES = ['image/png', 'image/x-icon', 'image/vnd.microsoft.icon'].freeze

    validates :attachment,
              content_type: VALID_CONTENT_TYPES,
              dimension: { max: 256..256 },
              aspect_ratio: :square,
              size: { less_than_or_equal_to: 1.megabyte }
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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