Module: Gorynich::Head::ActionCable::Channel
- Defined in:
- lib/gorynich/head/action_cable.rb
Class Method Summary collapse
Instance Method Summary collapse
- #perform_action(*args) ⇒ Object
- #subscribe_to_channel(*args) ⇒ Object
- #unsubscribe_from_channel(*args) ⇒ Object
Class Method Details
permalink .broadcasting_for(model) ⇒ Object
[View source]
36 37 38 39 40 |
# File 'lib/gorynich/head/action_cable.rb', line 36 def self.broadcasting_for(model) raise 'unable to broadcast message without tenant' if ::Gorynich::Current.tenant.nil? serialize_broadcasting([channel_name, ::Gorynich::Current.tenant, model]) end |
Instance Method Details
permalink #perform_action(*args) ⇒ Object
[View source]
30 31 32 33 34 |
# File 'lib/gorynich/head/action_cable.rb', line 30 def perform_action(*args) ::Gorynich.with(tenant, host: host) do super end end |
permalink #subscribe_to_channel(*args) ⇒ Object
[View source]
18 19 20 21 22 |
# File 'lib/gorynich/head/action_cable.rb', line 18 def subscribe_to_channel(*args) ::Gorynich.with(tenant, host: host) do super end end |
permalink #unsubscribe_from_channel(*args) ⇒ Object
[View source]
24 25 26 27 28 |
# File 'lib/gorynich/head/action_cable.rb', line 24 def unsubscribe_from_channel(*args) ::Gorynich.with(tenant, host: host) do super end end |