class ActionDispatch::Routing::Mapper::Constraints
def constraint_args(constraint, request)
def constraint_args(constraint, request) arity = if constraint.respond_to?(:arity) constraint.arity else constraint.method(:call).arity end if arity < 1 [] elsif arity == 1 [request] else [request.path_parameters, request] end end