diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 20:26:29 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 20:36:11 +0100 |
commit | d1d1e303a8be3f0cc025e5369cefa9d993575b24 (patch) | |
tree | 36ae3bebf1b8909d93a5c78f1cef1e5ea8d7c66a /railties | |
parent | f229d0451306508a8a16af337deef01b5d66b6d7 (diff) | |
download | rails-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.rb | 2 |
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 |