aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 20:26:29 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 20:36:11 +0100
commitd1d1e303a8be3f0cc025e5369cefa9d993575b24 (patch)
tree36ae3bebf1b8909d93a5c78f1cef1e5ea8d7c66a /railties
parentf229d0451306508a8a16af337deef01b5d66b6d7 (diff)
downloadrails-d1d1e303a8be3f0cc025e5369cefa9d993575b24.tar.gz
rails-d1d1e303a8be3f0cc025e5369cefa9d993575b24.tar.bz2
rails-d1d1e303a8be3f0cc025e5369cefa9d993575b24.zip
Only mount the ActionCable server if ApplicationCable has been defined
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/routes.rb b/railties/lib/rails/generators/rails/app/templates/config/routes.rb
index 3dfd415645..722b845472 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/routes.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/routes.rb
@@ -2,5 +2,5 @@ Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
# Serve websocket cable requests in-process
- mount ActionCable.server => '/cable'
+ mount ActionCable.server => '/cable' if defined?(ApplicationCable)
end