提交 a28d0ea3 编写于 作者: J Joshua Peek

Remove rackmount const usage

上级 2da432dd
......@@ -195,9 +195,9 @@ def call(env)
@constraints.each { |constraint|
if constraint.respond_to?(:matches?) && !constraint.matches?(req)
return Rack::Mount::Const::EXPECTATION_FAILED_RESPONSE
return [417, {}, []]
elsif constraint.respond_to?(:call) && !constraint.call(req)
return Rack::Mount::Const::EXPECTATION_FAILED_RESPONSE
return [417, {}, []]
end
}
......
......@@ -5,7 +5,7 @@ module ActionDispatch
module Routing
class RouteSet #:nodoc:
NotFound = lambda { |env|
raise ActionController::RoutingError, "No route matches #{env[::Rack::Mount::Const::PATH_INFO].inspect} with #{env.inspect}"
raise ActionController::RoutingError, "No route matches #{env['PATH_INFO'].inspect} with #{env.inspect}"
}
PARAMETERS_KEY = 'action_dispatch.request.path_parameters'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册