diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2017-01-01 15:16:39 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2017-01-01 15:16:39 +0530 |
commit | 7bb52d27813c33e967b8de2fe7889f3be236ac25 (patch) | |
tree | e551f9486a48a938d65e2307bafea262d828bad4 /railties/lib | |
parent | 5053d5251fb8c03e666f1f8b765464ec33e3066e (diff) | |
download | rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.tar.gz rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.tar.bz2 rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.zip |
Remove bin/yarn if yarn is skipped, tidy up tests
- No need to remove bin/yarn separately for API only apps because
:skip_yarn is set to true for API only apps.
- Added a test for :skip_yarn config.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index eb66b0b16a..8efdfdcb44 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -350,8 +350,8 @@ module Rails end end - def delete_bin_yarn_if_api_option - remove_file "bin/yarn" if options[:api] + def delete_bin_yarn_if_skip_yarn_option + remove_file "bin/yarn" if options[:skip_yarn] end def finish_template |