mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use AbstractController error constants
This commit is contained in:
@@ -10,8 +10,7 @@ module ActionDispatch
|
||||
@@rescue_responses = Hash.new(:internal_server_error)
|
||||
@@rescue_responses.update({
|
||||
'ActionController::RoutingError' => :not_found,
|
||||
# TODO: Clean this up after the switch
|
||||
ActionController::UnknownAction.name => :not_found,
|
||||
'AbstractController::ActionNotFound' => :not_found,
|
||||
'ActiveRecord::RecordNotFound' => :not_found,
|
||||
'ActiveRecord::StaleObjectError' => :conflict,
|
||||
'ActiveRecord::RecordInvalid' => :unprocessable_entity,
|
||||
@@ -26,7 +25,7 @@ module ActionDispatch
|
||||
@@rescue_templates.update({
|
||||
'ActionView::MissingTemplate' => 'missing_template',
|
||||
'ActionController::RoutingError' => 'routing_error',
|
||||
ActionController::UnknownAction.name => 'unknown_action',
|
||||
'AbstractController::ActionNotFound' => 'unknown_action',
|
||||
'ActionView::Template::Error' => 'template_error'
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user