diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-07 16:39:52 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-07 19:03:57 +0200 |
commit | 569b7510d1251240fb85020a5cec5a6be3ea3781 (patch) | |
tree | 8d6fbf74e3502995133502988030836285867897 /lib | |
parent | d2a35981377bbfe3bb298c699fabae5c0b3411b8 (diff) | |
download | rails-569b7510d1251240fb85020a5cec5a6be3ea3781.tar.gz rails-569b7510d1251240fb85020a5cec5a6be3ea3781.tar.bz2 rails-569b7510d1251240fb85020a5cec5a6be3ea3781.zip |
No need to use a channel_ prefix inside the channel
Diffstat (limited to 'lib')
-rw-r--r-- | lib/action_cable/channel/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index 336bb43092..366ffb1da8 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -11,10 +11,10 @@ module ActionCable attr_reader :params, :connection delegate :logger, to: :connection - def initialize(connection, channel_identifier, params = {}) + def initialize(connection, identifier, params = {}) @connection = connection - @channel_identifier = channel_identifier - @params = params + @identifier = identifier + @params = params subscribe_to_channel end @@ -68,7 +68,7 @@ module ActionCable def transmit(data, via: nil) if authorized? logger.info "#{channel_name} transmitting #{data.inspect}".tap { |m| m << " (via #{via})" if via } - connection.transmit({ identifier: @channel_identifier, message: data }.to_json) + connection.transmit({ identifier: @identifier, message: data }.to_json) else unauthorized end |