From 471ba41fddeff19f04f8d29bfe0df3c3f497407a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 19 Jun 2015 18:55:35 +0200 Subject: Free up subscribe/unsubscribe as action names the user can use in their channels --- lib/action_cable/connection/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/action_cable/connection') diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index ee1fe51529..fff6fd46a6 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -81,7 +81,7 @@ module ActionCable def cleanup_subscriptions @subscriptions.each do |id, channel| - channel.unsubscribe + channel.run_unsubscribe_callbacks end end @@ -161,7 +161,7 @@ module ActionCable def unsubscribe_channel(data) logger.info "Unsubscribing from channel: #{data['identifier']}" - @subscriptions[data['identifier']].unsubscribe + @subscriptions[data['identifier']].run_unsubscribe_callbacks @subscriptions.delete(data['identifier']) end -- cgit v1.2.3