aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2015-06-24 14:26:26 -0400
committerJavan Makhmali <javan@javan.us>2015-06-24 14:26:26 -0400
commit268ee5208ce513eb0b74e2354259e7991d1633c9 (patch)
treea2ad2d5c0d68e0afda949df01ad9505fe95ec610 /lib/action_cable
parent2ecc9b513821a7ebf365f42f2061e4e4300cf6d3 (diff)
downloadrails-268ee5208ce513eb0b74e2354259e7991d1633c9.tar.gz
rails-268ee5208ce513eb0b74e2354259e7991d1633c9.tar.bz2
rails-268ee5208ce513eb0b74e2354259e7991d1633c9.zip
Create JavaScript channels identified by their Ruby class name
Diffstat (limited to 'lib/action_cable')
-rw-r--r--lib/action_cable/connection/subscriptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/action_cable/connection/subscriptions.rb b/lib/action_cable/connection/subscriptions.rb
index e0a3a133c5..992def173e 100644
--- a/lib/action_cable/connection/subscriptions.rb
+++ b/lib/action_cable/connection/subscriptions.rb
@@ -24,7 +24,7 @@ module ActionCable
id_options = ActiveSupport::JSON.decode(id_key).with_indifferent_access
subscription_klass = connection.server.registered_channels.detect do |channel_klass|
- channel_klass.find_name == id_options[:channel]
+ channel_klass == id_options[:channel].safe_constantize
end
if subscription_klass
@@ -67,4 +67,4 @@ module ActionCable
end
end
end
-end \ No newline at end of file
+end