Class: ActiveStorage::Current

Inherits:
ActiveSupport::CurrentAttributes
  • Object
show all
Defined in:
app/models/active_storage/current.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#hostObject



11
12
13
14
# File 'app/models/active_storage/current.rb', line 11

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

#host=(host) ⇒ Object



6
7
8
9
# File 'app/models/active_storage/current.rb', line 6

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