Sha256: f3da10a9f251315a5ed486edf92cbf4d02f0a13877cf229d5cd3d0fa9f9c53fa

Contents?: true

Size: 508 Bytes

Versions: 37

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

class ActiveStorage::Current < ActiveSupport::CurrentAttributes # :nodoc:
  attribute :url_options

  def host=(host)
    ActiveSupport::Deprecation.warn("ActiveStorage::Current.host= is deprecated, instead use ActiveStorage::Current.url_options=")
    self.url_options = { host: host }
  end

  def host
    ActiveSupport::Deprecation.warn("ActiveStorage::Current.host is deprecated, instead use ActiveStorage::Current.url_options")
    self.url_options&.dig(:host)
  end
end

Version data entries

37 entries across 35 versions & 4 rubygems

Version Path
activestorage-7.0.8.6 app/models/active_storage/current.rb
activestorage-7.0.8.5 app/models/active_storage/current.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activestorage-7.0.8.4/app/models/active_storage/current.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/models/active_storage/current.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/models/active_storage/current.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/models/active_storage/current.rb
activestorage-7.0.8.4 app/models/active_storage/current.rb
activestorage-7.0.8.1 app/models/active_storage/current.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/app/models/active_storage/current.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/app/models/active_storage/current.rb
activestorage-7.0.8 app/models/active_storage/current.rb
activestorage-7.0.7.2 app/models/active_storage/current.rb
activestorage-7.0.7.1 app/models/active_storage/current.rb
activestorage-7.0.7 app/models/active_storage/current.rb
activestorage-7.0.6 app/models/active_storage/current.rb
activestorage-7.0.5.1 app/models/active_storage/current.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/app/models/active_storage/current.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/app/models/active_storage/current.rb
activestorage-7.0.5 app/models/active_storage/current.rb
activestorage-7.0.4.3 app/models/active_storage/current.rb