diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-05-28 16:50:15 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2016-05-28 16:50:15 +0200 |
commit | af245aaf3a1c447752a1b5895adddc66e5f73c00 (patch) | |
tree | 476b68753d5411c7d5d85a9644565a3b8311e886 /railties/lib | |
parent | 69e1bb521eb06d2bbf6060dc34acceecae229e20 (diff) | |
parent | 985d8b25623dfd11972fa6966d0e47695c347084 (diff) | |
download | rails-af245aaf3a1c447752a1b5895adddc66e5f73c00.tar.gz rails-af245aaf3a1c447752a1b5895adddc66e5f73c00.tar.bz2 rails-af245aaf3a1c447752a1b5895adddc66e5f73c00.zip |
Merge pull request #25182 from rails/remove-public-files-for-api-apps
Remove public/ files for API apps
Diffstat (limited to 'railties/lib')
-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' |