aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/subscription_adapter
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-24 15:51:21 +1030
committerMatthew Draper <matthew@trebex.net>2016-01-24 15:52:47 +1030
commite81bb80cb4214ff795f7a2bb03f699e2a7f7d45a (patch)
treec5a4cca8a8fb7f2129330e3b9bbc399886cccc03 /actioncable/lib/action_cable/subscription_adapter
parentdccc15d4030f250f38987328b6201282c1ef34a5 (diff)
downloadrails-e81bb80cb4214ff795f7a2bb03f699e2a7f7d45a.tar.gz
rails-e81bb80cb4214ff795f7a2bb03f699e2a7f7d45a.tar.bz2
rails-e81bb80cb4214ff795f7a2bb03f699e2a7f7d45a.zip
Normalize on no arguments for the success callback
Diffstat (limited to 'actioncable/lib/action_cable/subscription_adapter')
-rw-r--r--actioncable/lib/action_cable/subscription_adapter/redis.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/subscription_adapter/redis.rb b/actioncable/lib/action_cable/subscription_adapter/redis.rb
index e42ab2a03f..90abf21367 100644
--- a/actioncable/lib/action_cable/subscription_adapter/redis.rb
+++ b/actioncable/lib/action_cable/subscription_adapter/redis.rb
@@ -12,7 +12,7 @@ module ActionCable
def subscribe(channel, message_callback, success_callback = nil)
redis_connection_for_subscriptions.pubsub.subscribe(channel, &message_callback).tap do |result|
- result.callback(&success_callback) if success_callback
+ result.callback { |reply| success_callback.call } if success_callback
end
end