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.
Direct Known Subclasses
Instance Method Summary collapse
-
#renderer ⇒ ActionController::Renderer
This method will return ApplicationController.renderer with our Warden::Proxy instance added to the default environment hash.
-
#subscribed ⇒ void
Streams updates to the current account when the client subscribes.
Instance Method Details
#renderer ⇒ ActionController::Renderer
This method will return ApplicationController.renderer with our
Warden::Proxy instance added to the default environment hash.
19 20 21 22 23 24 25 |
# File 'app/channels/application_cable/channel.rb', line 19 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 ⇒ void
This method returns an undefined value.
Streams updates to the current account when the client subscribes.
11 12 13 |
# File 'app/channels/application_cable/channel.rb', line 11 def subscribed stream_for current_account end |