diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-16 14:15:26 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-16 14:15:26 -0400 |
commit | 7f318c3ec535afe53733c55cd0ecaccc16a8b944 (patch) | |
tree | 405f8e828b0d0f0d5eecb28ac844308beec19cf6 /actionpack/lib | |
parent | a6d8ca0f0e65ce509793713cb1efe4ab721b9eb4 (diff) | |
download | rails-7f318c3ec535afe53733c55cd0ecaccc16a8b944.tar.gz rails-7f318c3ec535afe53733c55cd0ecaccc16a8b944.tar.bz2 rails-7f318c3ec535afe53733c55cd0ecaccc16a8b944.zip |
Instead of checking Rails.env.test? in Failsafe middleware, check env["rails.raise_exceptions"]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/failsafe.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/failsafe.rb b/actionpack/lib/action_dispatch/middleware/failsafe.rb index 836098482c..389accbc36 100644 --- a/actionpack/lib/action_dispatch/middleware/failsafe.rb +++ b/actionpack/lib/action_dispatch/middleware/failsafe.rb @@ -10,9 +10,8 @@ module ActionDispatch def call(env) @app.call(env) rescue Exception => exception - # Reraise exception in test environment - if defined?(Rails) && Rails.env.test? - raise exception + if env["rails.raise_exceptions"] + raise else failsafe_response(exception) end |