Skip to content

Commit

Permalink
Remove rackmount const usage
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Nov 13, 2009
1 parent 2da432d commit a28d0ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/routing/route_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a28d0ea

Please sign in to comment.