From a21f6c8761242f2b3dd0463085889f4cf6907269 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 7 Jul 2015 16:46:13 +0200 Subject: Go with process_action to match language from Action Controller --- lib/action_cable/channel/base.rb | 2 +- lib/action_cable/connection/subscriptions.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index 1ec4ee5fe9..8e5a4e9cbc 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -19,7 +19,7 @@ module ActionCable subscribe_to_channel end - def perform_action(data) + def process_action(data) if authorized? action = extract_action(data) diff --git a/lib/action_cable/connection/subscriptions.rb b/lib/action_cable/connection/subscriptions.rb index 7fd4f510bf..438fb08f38 100644 --- a/lib/action_cable/connection/subscriptions.rb +++ b/lib/action_cable/connection/subscriptions.rb @@ -10,7 +10,7 @@ module ActionCable case data['command'] when 'subscribe' then add data when 'unsubscribe' then remove data - when 'message' then perform_action data + when 'message' then process_action data else logger.error "Received unrecognized command in #{data.inspect}" end @@ -39,8 +39,8 @@ module ActionCable subscriptions.delete(data['identifier']) end - def perform_action(data) - find(data).perform_action ActiveSupport::JSON.decode(data['data']) + def process_action(data) + find(data).process_action ActiveSupport::JSON.decode(data['data']) end -- cgit v1.2.3