aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-12-21 14:31:42 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-12-21 14:31:42 +0100
commit26a8320c727cb516b116bf4e7d40bb134b2c42b5 (patch)
tree9138e18982d847482213c66acc64f91b3a88c9ec /actioncable
parent9aff14f1eef5771ca816d04cf725dc870f7f0dc8 (diff)
parent61366f5a3db91cae4313cc9f19396e96cddf643a (diff)
downloadrails-26a8320c727cb516b116bf4e7d40bb134b2c42b5.tar.gz
rails-26a8320c727cb516b116bf4e7d40bb134b2c42b5.tar.bz2
rails-26a8320c727cb516b116bf4e7d40bb134b2c42b5.zip
Merge pull request #22692 from ryohashimoto/22669_api_generator
Action Cable channel generator doesn't create JS assets if options[:rails][:assets] is false
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