aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-06-21 19:50:17 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-06-21 19:50:17 +0200
commit6ae798fc842c65011528175136fcda85d95ab16c (patch)
treecf2f1bf0ca3ece813676e8fc928d9961d7f6f9af /lib/action_cable
parent890bee58f31ffe65e0127a8795c3432a18633013 (diff)
downloadrails-6ae798fc842c65011528175136fcda85d95ab16c.tar.gz
rails-6ae798fc842c65011528175136fcda85d95ab16c.tar.bz2
rails-6ae798fc842c65011528175136fcda85d95ab16c.zip
Styling
Diffstat (limited to 'lib/action_cable')
-rw-r--r--lib/action_cable/connection/base.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb
index 321a57fe44..6973848589 100644
--- a/lib/action_cable/connection/base.rb
+++ b/lib/action_cable/connection/base.rb
@@ -69,12 +69,9 @@ module ActionCable
data = ActiveSupport::JSON.decode data_in_json
case data['command']
- when 'subscribe'
- subscribe_channel(data)
- when 'unsubscribe'
- unsubscribe_channel(data)
- when 'message'
- process_message(data)
+ when 'subscribe' then subscribe_channel data
+ when 'unsubscribe' then unsubscribe_channel data
+ when 'message' then process_message data
else
logger.error "Received unrecognized command in #{data.inspect}"
end