aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-08-20 18:24:22 +0100
committerLouise Crow <louise.crow@gmail.com>2013-08-20 18:24:22 +0100
commit569e25490440bc03e1579ad41867c2af5edfddaf (patch)
treef6a9c24f5f5d08ef0929b88f325add355c25f7ad /app/controllers/application_controller.rb
parent821e40dcc2d202c508971f0fe927f366d75488a9 (diff)
parente7bdf54de3a94986c35204ad28e2cbd0a4e98c46 (diff)
Merge remote-tracking branch 'openaustralia_github/fix-production-diagnostic-messages' into rails-3-develop
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 88b107861..2ce44011f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -119,12 +119,9 @@ class ApplicationController < ActionController::Base
end
def render_exception(exception)
-
- # In development, or the admin interface, or for a local request, let Rails handle the exception
- # with its stack trace templates. Local requests in testing are a special case so that we can
- # test this method - there we use consider_all_requests_local to control behaviour.
- if Rails.application.config.consider_all_requests_local || local_request? ||
- (request.local? && !Rails.env.test?)
+ # In development or the admin interface let Rails handle the exception
+ # with its stack trace templates
+ if Rails.application.config.consider_all_requests_local || show_rails_exceptions?
raise exception
end
@@ -150,7 +147,7 @@ class ApplicationController < ActionController::Base
end
end
- def local_request?
+ def show_rails_exceptions?
false
end