Class: ApplicationCable::Channel
- Inherits:
-
ActionCable::Channel::Base
- Object
- ActionCable::Channel::Base
- ApplicationCable::Channel
- Defined in:
- app/channels/application_cable/channel.rb
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.
13 14 15 16 17 18 19 |
# File 'app/channels/application_cable/channel.rb', line 13 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
7 8 9 |
# File 'app/channels/application_cable/channel.rb', line 7 def subscribed stream_for current_account end |