aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/server
diff options
context:
space:
mode:
authorSergey Novikov <novikov359@gmail.com>2016-01-22 16:52:12 +0300
committerSergey Novikov <novikov359@gmail.com>2016-01-22 16:52:12 +0300
commit91656aed59d45893383c99d068f42774a22ac254 (patch)
tree30ff61222b706de7c73879b14974a8a5b56099db /actioncable/lib/action_cable/server
parent8383f79d9207df149c533e220776bdae218cc51d (diff)
downloadrails-91656aed59d45893383c99d068f42774a22ac254.tar.gz
rails-91656aed59d45893383c99d068f42774a22ac254.tar.bz2
rails-91656aed59d45893383c99d068f42774a22ac254.zip
Allow adding custom paths for action_cable channels
Diffstat (limited to 'actioncable/lib/action_cable/server')
-rw-r--r--actioncable/lib/action_cable/server/configuration.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/server/configuration.rb b/actioncable/lib/action_cable/server/configuration.rb
index ebbf60c6e2..236096fb5f 100644
--- a/actioncable/lib/action_cable/server/configuration.rb
+++ b/actioncable/lib/action_cable/server/configuration.rb
@@ -15,13 +15,15 @@ module ActionCable
@connection_class = ApplicationCable::Connection
@worker_pool_size = 100
- @channels_path = Rails.root.join('app/channels')
+ @channels_path = [Rails.root.join('app/channels')]
@disable_request_forgery_protection = false
end
def channel_paths
- @channels ||= Dir["#{channels_path}/**/*_channel.rb"]
+ @channels ||= channels_path.collect do |channel_path|
+ Dir["#{channel_path}/**/*_channel.rb"]
+ end.flatten
end
def channel_class_names