From 7cf856e91fed0e1149bb305f226afc77ec496ffc Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 17 Dec 2015 11:25:05 +0100 Subject: Don't mount the ActionCable server by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we require you to enable it on the client-side, let us do the same on the server-side. Then you’re not running an EventMachine unless you need to. --- .../generators/rails/app/templates/app/assets/javascripts/cable.coffee | 2 +- railties/lib/rails/generators/rails/app/templates/config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee index 4166ea02f1..cb7653cdc5 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee +++ b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee @@ -2,6 +2,6 @@ #= require_self #= require_tree ./channels -# Turn on the cable connection by removing the comments from the statements below: +# Turn on the cable connection (ensure it's also on in config/routes.rb): # @App ||= {} # App.cable = ActionCable.createConsumer() 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..8293c8a483 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' end -- cgit v1.2.3