aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/channel/broadcasting.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add note about broadcast_to/broadcasting_for to change logVladimir Dementyev2019-01-221-1/+6
|
* Add Channel#broadcast_toVladimir Dementyev2019-01-221-1/+1
|
* Move `channel_name` to Channel.broadcasting_forVladimir Dementyev2019-01-221-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That would allow us to test broadcasting made with channel, e.g.: ```ruby class ChatRelayJob < ApplicationJob def perform_later(room, msg) ChatChannel.broadcast_to room, message: msg end end ``` To test this functionality we need to know the underlying stream name (to use `assert_broadcasts`), which relies on `channel_name`. We had to use the following code: ```ruby assert_broadcasts(ChatChannel.broadcasting_for([ChatChannel.channel_name, room]), 1) do ChatRelayJob.perform_now end ``` The problem with this approach is that we use _internal_ API (we shouldn't care about `channel_name` prefix in our code). With this commit we could re-write the test as following: ```ruby assert_broadcasts(ChatChannel.broadcasting_for(room), 1) do ChatRelayJob.perform_now end ```
* Class methods in the `class_methods` blocks are wrongly appeared in the docRyuta Kamizono2018-04-041-1/+1
| | | | | | | It is wrongly appeared as instance public methods in the doc. http://api.rubyonrails.org/v5.1.6/classes/ActionCable/Channel/Callbacks.html http://api.rubyonrails.org/v5.1.6/classes/ActiveRecord/Timestamp.html
* Use frozen string literal in actioncable/Kir Shatrov2017-07-231-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in actioncable/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Get ready to merge into RailsDavid Heinemeier Hansson2015-12-141-0/+29