aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/channel
diff options
context:
space:
mode:
authorRoman Pushkin <roman.pushkin@gmail.com>2016-05-18 14:12:11 -0700
committerRoman Pushkin <roman.pushkin@gmail.com>2016-05-18 14:12:11 -0700
commita3c4d035f05287b09f7216a594d333fd0d85650a (patch)
treeced14a662cc25b8c6f6e69910658aff6d58a07dc /actioncable/lib/action_cable/channel
parent8327f63decdc3c02f969bccb786c0b6ef632d3b0 (diff)
downloadrails-a3c4d035f05287b09f7216a594d333fd0d85650a.tar.gz
rails-a3c4d035f05287b09f7216a594d333fd0d85650a.tar.bz2
rails-a3c4d035f05287b09f7216a594d333fd0d85650a.zip
Improve method description
Method description improved to reflect little bit more complicated scenario when names are camel-cased.
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-rw-r--r--actioncable/lib/action_cable/channel/naming.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actioncable/lib/action_cable/channel/naming.rb b/actioncable/lib/action_cable/channel/naming.rb
index 4c9d53b15a..8e1b2a4af0 100644
--- a/actioncable/lib/action_cable/channel/naming.rb
+++ b/actioncable/lib/action_cable/channel/naming.rb
@@ -10,6 +10,7 @@ module ActionCable
#
# ChatChannel.channel_name # => 'chat'
# Chats::AppearancesChannel.channel_name # => 'chats:appearances'
+ # FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appearances'
def channel_name
@channel_name ||= name.sub(/Channel$/, '').gsub('::',':').underscore
end