diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-08 22:19:00 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-08 22:19:00 +0000 |
commit | a454dcf012e13f24c6c74098f9fd4efd72e8aadc (patch) | |
tree | 00664b888dd1ef988abc81877a01d7a69e7cb1d6 /actionpack/lib | |
parent | 906bd93f4fdbad429cca8a0cfa7f32ec1eb7960a (diff) | |
download | rails-a454dcf012e13f24c6c74098f9fd4efd72e8aadc.tar.gz rails-a454dcf012e13f24c6c74098f9fd4efd72e8aadc.tar.bz2 rails-a454dcf012e13f24c6c74098f9fd4efd72e8aadc.zip |
Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index 08ee699f7f..01969e867c 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -11,7 +11,8 @@ module ActionController #:nodoc: DEFAULT_RESCUE_RESPONSE = :internal_server_error DEFAULT_RESCUE_RESPONSES = { 'ActionController::RoutingError' => :not_found, - 'ActionController::UnknownAction' => :not_found + 'ActionController::UnknownAction' => :not_found, + 'ActiveRecord::RecordNotFound' => :not_found } DEFAULT_RESCUE_TEMPLATE = 'diagnostics' |