Class: ApplicationCable::Connection
- Inherits:
-
ActionCable::Connection::Base
- Object
- ActionCable::Connection::Base
- ApplicationCable::Connection
- Defined in:
- app/channels/application_cable/connection.rb
Instance Attribute Summary collapse
-
#warden ⇒ Object
readonly
Returns the value of attribute warden.
Instance Method Summary collapse
Instance Attribute Details
#warden ⇒ Object (readonly)
Returns the value of attribute warden.
26 27 28 |
# File 'app/channels/application_cable/connection.rb', line 26 def warden @warden end |
Instance Method Details
#connect ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/channels/application_cable/connection.rb', line 28 def connect # Only allow connections from CRM subdomain with authenticated users unless crm_subdomain? && authenticated_user? self.current_account = env['warden'].user @warden = env['warden'] end |