instance method
request
Ruby on Rails 8.1.2
Since v5.2.8.1 PrivateSignature
request()
The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc.
Source
# File actioncable/lib/action_cable/connection/base.rb, line 178
def request # :doc:
@request ||= begin
environment = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
ActionDispatch::Request.new(environment || env)
end
end
Defined in actioncable/lib/action_cable/connection/base.rb line 178
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Connection::Base