diff options
author | Ryo Hashimoto <ryohashimoto@gmail.com> | 2015-12-19 13:43:11 +0900 |
---|---|---|
committer | Ryo Hashimoto <ryohashimoto@gmail.com> | 2015-12-19 13:43:11 +0900 |
commit | 61366f5a3db91cae4313cc9f19396e96cddf643a (patch) | |
tree | cc9d9ddf1e9cc1856bc0f4ebec9555d607ad3971 /actioncable/lib/rails | |
parent | 914a45b5fef39c436322bca02566d0d11e1cbb84 (diff) | |
download | rails-61366f5a3db91cae4313cc9f19396e96cddf643a.tar.gz rails-61366f5a3db91cae4313cc9f19396e96cddf643a.tar.bz2 rails-61366f5a3db91cae4313cc9f19396e96cddf643a.zip |
Action Cable channel generator should not create JS assets in --api mode
Diffstat (limited to 'actioncable/lib/rails')
-rw-r--r-- | actioncable/lib/rails/generators/channel/channel_generator.rb | 4 |
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 |