diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-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 035047085d..e0107c5050 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -12,7 +12,8 @@ module ActionController #:nodoc: DEFAULT_RESCUE_RESPONSES = { 'ActionController::RoutingError' => :not_found, 'ActionController::UnknownAction' => :not_found, - 'ActiveRecord::RecordNotFound' => :not_found + 'ActiveRecord::RecordNotFound' => :not_found, + 'ActiveRecord::RecordInvalid' => :bad_request } DEFAULT_RESCUE_TEMPLATE = 'diagnostics' |