aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/channel/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/channel/base.rb')
-rw-r--r--lib/action_cable/channel/base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb
index 1ede07d9e3..6eaade4c8f 100644
--- a/lib/action_cable/channel/base.rb
+++ b/lib/action_cable/channel/base.rb
@@ -15,6 +15,10 @@ module ActionCable
def matches?(identifier)
raise "Please implement #{name}#matches? method"
end
+
+ def find_name
+ @name ||= channel_name || to_s.demodulize.underscore
+ end
end
def initialize(connection, channel_identifier, params = {})