diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-07 16:46:13 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-07 19:03:57 +0200 |
commit | a21f6c8761242f2b3dd0463085889f4cf6907269 (patch) | |
tree | 0f6d2416e5affca8a32ee188daa3526a13a54a07 | |
parent | 982a48894c3f38c8ca4b0be4b6f7870fffaaf9a6 (diff) | |
download | rails-a21f6c8761242f2b3dd0463085889f4cf6907269.tar.gz rails-a21f6c8761242f2b3dd0463085889f4cf6907269.tar.bz2 rails-a21f6c8761242f2b3dd0463085889f4cf6907269.zip |
Go with process_action to match language from Action Controller
-rw-r--r-- | lib/action_cable/channel/base.rb | 2 | ||||
-rw-r--r-- | lib/action_cable/connection/subscriptions.rb | 6 |
2 files changed, 4 insertions, 4 deletions
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 |