Class: ApplicationCable::Channel
- Inherits:
-
ActionCable::Channel::Base
- Object
- ActionCable::Channel::Base
- ApplicationCable::Channel
- Defined in:
- app/channels/application_cable/channel.rb
Overview
Action Cable base channel.
Instance Method Summary collapse
-
#renderer ⇒ Object
This method will return ApplicationController.renderer with our Warden::Proxy instance added to the default environment hash.
- #subscribed ⇒ Object
Instance Method Details
#renderer ⇒ Object
This method will return ApplicationController.renderer with our
Warden::Proxy instance added to the default environment hash.
14 15 16 17 18 19 20 |
# File 'app/channels/application_cable/channel.rb', line 14 def renderer ApplicationController.renderer.tap do |default_renderer| default_env = default_renderer.instance_variable_get(:@env) env_with_warden = default_env.merge('warden' => connection.warden) default_renderer.instance_variable_set(:@env, env_with_warden) end end |
#subscribed ⇒ Object
8 9 10 |
# File 'app/channels/application_cable/channel.rb', line 8 def subscribed stream_for current_account end |