aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Dementyev <dementiev.vm@gmail.com>2019-01-22 14:31:51 -0500
committerVladimir Dementyev <dementiev.vm@gmail.com>2019-01-22 15:14:35 -0500
commit35bef64718f85ef550916f840fd10a9288185577 (patch)
tree1587b220e6817b40ce8e9f2d7ae442ea805b69a7
parentdc80459a9e9a6088668f93c9f44be4c170193fb7 (diff)
downloadrails-35bef64718f85ef550916f840fd10a9288185577.tar.gz
rails-35bef64718f85ef550916f840fd10a9288185577.tar.bz2
rails-35bef64718f85ef550916f840fd10a9288185577.zip
Add Channel#broadcast_to
-rw-r--r--actioncable/lib/action_cable/channel/broadcasting.rb2
-rw-r--r--actioncable/test/channel/test_case_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/channel/broadcasting.rb b/actioncable/lib/action_cable/channel/broadcasting.rb
index bd900e1c65..6c7aec49e3 100644
--- a/actioncable/lib/action_cable/channel/broadcasting.rb
+++ b/actioncable/lib/action_cable/channel/broadcasting.rb
@@ -7,7 +7,7 @@ module ActionCable
module Broadcasting
extend ActiveSupport::Concern
- delegate :broadcasting_for, to: :class
+ delegate :broadcasting_for, :broadcast_to, to: :class
module ClassMethods
# Broadcast a hash to a unique broadcasting for this <tt>model</tt> in this channel.
diff --git a/actioncable/test/channel/test_case_test.rb b/actioncable/test/channel/test_case_test.rb
index 9c360d5dc3..a166c41e11 100644
--- a/actioncable/test/channel/test_case_test.rb
+++ b/actioncable/test/channel/test_case_test.rb
@@ -180,7 +180,7 @@ class BroadcastsTestChannel < ActionCable::Channel::Base
def broadcast_to_user(data)
user = User.new user_id
- self.class.broadcast_to user, text: data["message"]
+ broadcast_to user, text: data["message"]
end
end