diff options
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 11 | ||||
-rw-r--r-- | railties/test/generators/api_app_generator_test.rb | 8 |
2 files changed, 18 insertions, 1 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' diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index 8e1cd0891a..46efa3856c 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -105,6 +105,12 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase lib/assets vendor/assets test/helpers - tmp/cache/assets) + tmp/cache/assets + public/404.html + public/422.html + public/500.html + public/apple-touch-icon-precomposed.png + public/apple-touch-icon.png + public/favicon.ico) end end |