From a1200616cc22ad266537e31a808a1e90bf4da79f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Jul 2015 22:36:08 +0200 Subject: =?UTF-8?q?Revert=20to=20perform=5Faction=20language=20=E2=80=93?= =?UTF-8?q?=20we're=20already=20using=20process=20for=20the=20connection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 9c23ba382b..f389e360f6 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -83,7 +83,7 @@ module ActionCable # Extract the action name from the passed data and process it via the channel. The process will ensure # that the action requested is a public method on the channel declared by the user (so not one of the callbacks # like #subscribed). - def process_action(data) + def perform_action(data) action = extract_action(data) if processable_action?(action) diff --git a/lib/action_cable/connection/subscriptions.rb b/lib/action_cable/connection/subscriptions.rb index 803894c8f6..0411d96413 100644 --- a/lib/action_cable/connection/subscriptions.rb +++ b/lib/action_cable/connection/subscriptions.rb @@ -12,7 +12,7 @@ module ActionCable case data['command'] when 'subscribe' then add data when 'unsubscribe' then remove data - when 'message' then process_action data + when 'message' then perform_action data else logger.error "Received unrecognized command in #{data.inspect}" end @@ -41,8 +41,8 @@ module ActionCable subscriptions.delete(data['identifier']) end - def process_action(data) - find(data).process_action ActiveSupport::JSON.decode(data['data']) + def perform_action(data) + find(data).perform_action ActiveSupport::JSON.decode(data['data']) end -- cgit v1.2.3