Skip to content

Commit

Permalink
clearer conditional in constraint match check
Browse files Browse the repository at this point in the history
  • Loading branch information
goshacmd committed Jan 10, 2013
1 parent 34126fa commit caa54db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def initialize(app, constraints, request)
def matches?(env)
req = @request.new(env)

@constraints.none? do |constraint|
(constraint.respond_to?(:matches?) && !constraint.matches?(req)) ||
(constraint.respond_to?(:call) && !constraint.call(*constraint_args(constraint, req)))
@constraints.all? do |constraint|
(constraint.respond_to?(:matches?) && constraint.matches?(req)) ||
(constraint.respond_to?(:call) && constraint.call(*constraint_args(constraint, req)))
end
ensure
req.reset_parameters
Expand Down

0 comments on commit caa54db

Please sign in to comment.