diff options
author | Richard Machielse <richardmachielse@gmail.com> | 2017-09-25 13:03:52 +0200 |
---|---|---|
committer | Richard Machielse <richardmachielse@gmail.com> | 2017-09-26 11:47:55 +0200 |
commit | 4b629eca21fbecf9a49f00f3933ad4c28ad78600 (patch) | |
tree | 515ec930796e087aa84622d1cf7a38fa53cd49d0 /guides/source | |
parent | 5755f57f3e887df93e11c4b3efb8bf21226744cc (diff) | |
download | rails-4b629eca21fbecf9a49f00f3933ad4c28ad78600.tar.gz rails-4b629eca21fbecf9a49f00f3933ad4c28ad78600.tar.bz2 rails-4b629eca21fbecf9a49f00f3933ad4c28ad78600.zip |
ActionCable: use find method when unsubscribing
If a frontend for some reason tries to unsubscribe from a non existing subscription, the following error is logged:
Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [NoMethodError - undefined method `unsubscribe_from_channel' for nil:NilClass]
Instead, it will now properly log:
Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [RuntimeError - Unable to find subscription with identifier: {"channel":"SomeChannel"}]
Diffstat (limited to 'guides/source')
0 files changed, 0 insertions, 0 deletions