Sha256: 3771a634aad883f1a532bfa003886de99dee0d44c51c6c358c11ec52ef77a36a

Contents?: true

Size: 677 Bytes

Versions: 27

Compression:

Stored size: 677 Bytes

Contents

module Spree
  if Rails.application.config.use_paperclip
    ActiveSupport::Deprecation.warn(<<-EOS, caller)
     Paperclip support is deprecated, and will be removed in Spree 4.0.
     Please migrate to ActiveStorage, to avoid problems after update
     https://github.com/thoughtbot/paperclip/blob/master/MIGRATING.md
    EOS
    Paperclip.interpolates :viewable_id do |attachment, _style|
      attachment.instance.viewable_id
    end
  end

  class Asset < Spree::Base
    include Support::ActiveStorage unless Rails.application.config.use_paperclip

    belongs_to :viewable, polymorphic: true, touch: true
    acts_as_list scope: [:viewable_id, :viewable_type]
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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