diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-17 00:43:53 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-17 00:43:53 +0000 |
commit | d38417fc02bc12f1182c0821eda6b58ef3b8ca5a (patch) | |
tree | d0977d6d00a00790412c699467b841d33473def1 /actionpack/lib/action_controller | |
parent | b0a1aa7e7e4bc1b0a714fd143cc91944e2f4d230 (diff) | |
download | rails-d38417fc02bc12f1182c0821eda6b58ef3b8ca5a.tar.gz rails-d38417fc02bc12f1182c0821eda6b58ef3b8ca5a.tar.bz2 rails-d38417fc02bc12f1182c0821eda6b58ef3b8ca5a.zip |
RecordInvalid, RecordNotSaved => 422 Unprocessable Entity, StaleObjectError => 409 Conflict. References #7097.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index ca85ef34d0..9f94e076c7 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -16,7 +16,9 @@ module ActionController #:nodoc: 'ActionController::RoutingError' => :not_found, 'ActionController::UnknownAction' => :not_found, 'ActiveRecord::RecordNotFound' => :not_found, - 'ActiveRecord::RecordInvalid' => :bad_request + 'ActiveRecord::StaleObjectError' => :conflict, + 'ActiveRecord::RecordInvalid' => :unprocessable_entity, + 'ActiveRecord::RecordNotSaved' => :unprocessable_entity } DEFAULT_RESCUE_TEMPLATE = 'diagnostics' |