From e3dee30d561387d6f380c811b9c72622bca47220 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Dec 2015 12:18:07 +0100 Subject: Better explanation --- .../rails/app/templates/app/assets/javascripts/cable.coffee | 8 ++++++-- 1 file changed, 6 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 cb7653cdc5..49a7cfa69b 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 @@ -1,7 +1,11 @@ +# Action Cable provides the framework to deal with WebSockets in Rails. +# You can generate new channels where WebSocket features live using the rails generate channel command. +# +# Turn on the cable connection by removing the comments after the require statements (and ensure it's also on in config/routes.rb). +# #= require action_cable #= require_self #= require_tree ./channels - -# Turn on the cable connection (ensure it's also on in config/routes.rb): +# # @App ||= {} # App.cable = ActionCable.createConsumer() -- cgit v1.2.3