aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/exception_wrapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/exception_wrapper.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
index 9b44c4483e..397f0a8b92 100644
--- a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
+++ b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
@@ -6,19 +6,19 @@ module ActionDispatch
cattr_accessor :rescue_responses
@@rescue_responses = Hash.new(:internal_server_error)
@@rescue_responses.merge!(
- "ActionController::RoutingError" => :not_found,
- "AbstractController::ActionNotFound" => :not_found,
- "ActionController::MethodNotAllowed" => :method_not_allowed,
- "ActionController::UnknownHttpMethod" => :method_not_allowed,
- "ActionController::NotImplemented" => :not_implemented,
- "ActionController::UnknownFormat" => :not_acceptable,
- "ActionController::InvalidAuthenticityToken" => :unprocessable_entity,
- "ActionController::InvalidCrossOriginRequest" => :unprocessable_entity,
- "ActionDispatch::ParamsParser::ParseError" => :bad_request,
- "ActionController::BadRequest" => :bad_request,
- "ActionController::ParameterMissing" => :bad_request,
- "Rack::QueryParser::ParameterTypeError" => :bad_request,
- "Rack::QueryParser::InvalidParameterError" => :bad_request
+ "ActionController::RoutingError" => :not_found,
+ "AbstractController::ActionNotFound" => :not_found,
+ "ActionController::MethodNotAllowed" => :method_not_allowed,
+ "ActionController::UnknownHttpMethod" => :method_not_allowed,
+ "ActionController::NotImplemented" => :not_implemented,
+ "ActionController::UnknownFormat" => :not_acceptable,
+ "ActionController::InvalidAuthenticityToken" => :unprocessable_entity,
+ "ActionController::InvalidCrossOriginRequest" => :unprocessable_entity,
+ "ActionDispatch::Http::Parameters::ParseError" => :bad_request,
+ "ActionController::BadRequest" => :bad_request,
+ "ActionController::ParameterMissing" => :bad_request,
+ "Rack::QueryParser::ParameterTypeError" => :bad_request,
+ "Rack::QueryParser::InvalidParameterError" => :bad_request
)
cattr_accessor :rescue_templates
@@ -127,7 +127,7 @@ module ActionDispatch
File.open(full_path, "r") do |file|
start = [line - 3, 0].max
lines = file.each_line.drop(start).take(6)
- Hash[*(start+1..(lines.count+start)).zip(lines).flatten]
+ Hash[*(start + 1..(lines.count + start)).zip(lines).flatten]
end
end
end