Remove rackmount const usage

This commit is contained in:
Joshua Peek
2009-11-10 19:12:54 -06:00
parent 2da432dde3
commit a28d0ea33e
2 changed files with 3 additions and 3 deletions

View File

@@ -195,9 +195,9 @@ module ActionDispatch
@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
}

View File

@@ -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'