From 34bfca2fee65bc7b6bf8b64a890bd423595554c9 Mon Sep 17 00:00:00 2001 From: Jorge Bejar Date: Wed, 9 Dec 2015 10:48:59 -0300 Subject: [PATCH] We don't need to set config.debug_exception_response_format given that :api is the default value for only API apps --- .../app/templates/config/environments/development.rb.tt | 6 ------ railties/test/generators/api_app_generator_test.rb | 4 ---- 2 files changed, 10 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt index f91512b3af..2778dd8247 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt @@ -23,12 +23,6 @@ Rails.application.configure do config.action_controller.perform_caching = false config.cache_store = :null_store end - <%- if options[:api] -%> - - # Return error responses in the format requested by the client - # or default to JSON format. - config.debug_exception_response_format = :api - <%- end -%> <%- unless options.skip_action_mailer? -%> # Don't care if the mailer can't send. diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index 7273c67a4e..b5980746bb 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -48,10 +48,6 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase assert_match(/config.api_only = true/, content) end - assert_file "config/environments/development.rb" do |content| - assert_match(/config.debug_exception_response_format = :api/, content) - end - assert_file "config/initializers/cors.rb" assert_file "config/initializers/wrap_parameters.rb"