Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v5.0.0.1) is shown here.
missing_keys(route, parts)
private
Returns an array populated with missing keys if any are present.
# File actionpack/lib/action_dispatch/journey/formatter.rb, line 128
def missing_keys(route, parts)
missing_keys = nil
tests = route.path.requirements
route.required_parts.each { |key|
case tests[key]
when nil
unless parts[key]
missing_keys ||= []
missing_keys << key
end
when RegexCaseComparator
unless RegexCaseComparator::DEFAULT_REGEX === parts[key]
missing_keys ||= []
missing_keys << key
end
else
unless /\A#{tests[key]}\Z/ === parts[key]
missing_keys ||= []
missing_keys << key
end
end
}
missing_keys
end