diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-19 18:55:35 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-19 18:55:35 +0200 |
commit | 471ba41fddeff19f04f8d29bfe0df3c3f497407a (patch) | |
tree | 921c7917378e5d4ac06072ab98a310d7ca40f51f /lib/action_cable/channel | |
parent | 2b41ede6f8af2c69296478777babb5617d33b867 (diff) | |
download | rails-471ba41fddeff19f04f8d29bfe0df3c3f497407a.tar.gz rails-471ba41fddeff19f04f8d29bfe0df3c3f497407a.tar.bz2 rails-471ba41fddeff19f04f8d29bfe0df3c3f497407a.zip |
Free up subscribe/unsubscribe as action names the user can use in their channels
Diffstat (limited to 'lib/action_cable/channel')
-rw-r--r-- | lib/action_cable/channel/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index f309709e31..cc9580ec52 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -32,7 +32,7 @@ module ActionCable connect - subscribe + run_subscribe_callbacks end def receive_data(data) @@ -47,13 +47,13 @@ module ActionCable end end - def subscribe + def run_subscribe_callbacks self.class.on_subscribe_callbacks.each do |callback| send(callback) end end - def unsubscribe + def run_unsubscribe_callbacks self.class.on_unsubscribe_callbacks.each do |callback| send(callback) end |