aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable')
-rw-r--r--actioncable/lib/rails/generators/channel/channel_generator.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actioncable/lib/rails/generators/channel/channel_generator.rb b/actioncable/lib/rails/generators/channel/channel_generator.rb
index 2f37d8055b..925dd3d098 100644
--- a/actioncable/lib/rails/generators/channel/channel_generator.rb
+++ b/actioncable/lib/rails/generators/channel/channel_generator.rb
@@ -9,7 +9,9 @@ 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/channels', class_path, "#{file_name}.coffee")
+ if Rails::Generators.options[:rails][:assets]
+ template "assets/channel.coffee", File.join('app/assets/javascripts/channels', class_path, "#{file_name}.coffee")
+ end
end
protected