From d1d1e303a8be3f0cc025e5369cefa9d993575b24 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 16 Dec 2015 20:26:29 +0100 Subject: Only mount the ActionCable server if ApplicationCable has been defined --- railties/lib/rails/generators/rails/app/templates/config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') 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 -- cgit v1.2.3