diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-05-28 09:59:40 -0400 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-05-28 09:59:40 -0400 |
commit | 985d8b25623dfd11972fa6966d0e47695c347084 (patch) | |
tree | 8dc8ccf67cd28542c64f1b5e234c8a4987abcd99 /railties/lib/rails/generators | |
parent | f5f1caa0a74284a78eee00cdf1a322e8e3205103 (diff) | |
download | rails-985d8b25623dfd11972fa6966d0e47695c347084.tar.gz rails-985d8b25623dfd11972fa6966d0e47695c347084.tar.bz2 rails-985d8b25623dfd11972fa6966d0e47695c347084.zip |
Remove public/ files for API apps
- Fixes #25180
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 4d5bb364b2..1ac6fae908 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -305,6 +305,17 @@ module Rails end end + def delete_public_files_if_api_option + if options[:api] + remove_file 'public/404.html' + remove_file 'public/422.html' + remove_file 'public/500.html' + remove_file 'public/apple-touch-icon-precomposed.png' + remove_file 'public/apple-touch-icon.png' + remove_file 'public/favicon.ico' + end + end + def delete_js_folder_skipping_javascript if options[:skip_javascript] remove_dir 'app/assets/javascripts' |