diff options
author | Jay Hayes <ur@iamvery.com> | 2016-02-24 12:35:36 -0600 |
---|---|---|
committer | Jay Hayes <ur@iamvery.com> | 2016-02-24 12:43:23 -0600 |
commit | 046e32656efa989a112e9870d8aa25a49f944204 (patch) | |
tree | 15fb68344c6953873b0db062cea2618572d3e2c4 /actioncable/lib/action_cable/channel | |
parent | b42624725054f1c579d6a738701dfdbb2003f087 (diff) | |
download | rails-046e32656efa989a112e9870d8aa25a49f944204.tar.gz rails-046e32656efa989a112e9870d8aa25a49f944204.tar.bz2 rails-046e32656efa989a112e9870d8aa25a49f944204.zip |
Convert stream broadcasting to a string
ActionCable does some things behind the scenes that expects these
"broadcasting"s or "channel"s to be strings. However it's not
immediately obvious that the value must be a string. So adding this
conversion ensures things work as expected.
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-rw-r--r-- | actioncable/lib/action_cable/channel/streams.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actioncable/lib/action_cable/channel/streams.rb b/actioncable/lib/action_cable/channel/streams.rb index 3e3be4cd44..28092a8b2b 100644 --- a/actioncable/lib/action_cable/channel/streams.rb +++ b/actioncable/lib/action_cable/channel/streams.rb @@ -72,6 +72,7 @@ module ActionCable # Start streaming from the named <tt>broadcasting</tt> pubsub queue. Optionally, you can pass a <tt>callback</tt> that'll be used # instead of the default of just transmitting the updates straight to the subscriber. def stream_from(broadcasting, callback = nil) + broadcasting = String(broadcasting) # Don't send the confirmation until pubsub#subscribe is successful defer_subscription_confirmation! |