From 70be2486f37175467777eef1b6366d22ae141036 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 16 Dec 2015 18:58:43 +0100 Subject: Simpler directory structure --- actioncable/lib/rails/generators/channel/channel_generator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actioncable/lib') diff --git a/actioncable/lib/rails/generators/channel/channel_generator.rb b/actioncable/lib/rails/generators/channel/channel_generator.rb index 8f1c812c27..8646a5460c 100644 --- a/actioncable/lib/rails/generators/channel/channel_generator.rb +++ b/actioncable/lib/rails/generators/channel/channel_generator.rb @@ -9,12 +9,12 @@ module Rails def create_channel_file template "channel.rb", File.join('app/channels', class_path, "#{file_name}_channel.rb") - template "assets/channel.coffee", File.join('app/assets/javascripts/cable/channels', class_path, "#{file_name}.coffee") + template "assets/channel.coffee", File.join('app/assets/javascripts/channels', class_path, "#{file_name}.coffee") if self.behavior == :invoke template "application_cable/connection.rb", 'app/channels/application_cable/connection.rb' template "application_cable/channel.rb", 'app/channels/application_cable/channel.rb' - template "assets/consumer.coffee", 'app/assets/javascripts/cable/index.coffee' + template "assets/consumer.coffee", 'app/assets/javascripts/cable.coffee' end end -- cgit v1.2.3