method
constraints
v4.2.7 -
Show latest stable
- Class:
ActionDispatch::Routing::Mapper::Mapping
constraints(options, path_params)private
No documentation available.
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 331
def constraints(options, path_params)
constraints = {}
required_defaults = []
options.each_pair do |key, option|
if Regexp === option
constraints[key] = option
else
required_defaults << key unless path_params.include?(key)
end
end
@conditions[:required_defaults] = required_defaults
constraints
end