diff options
-rw-r--r-- | actionpack/lib/action_dispatch/journey/formatter.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb index d6daf5280b..d839fec48d 100644 --- a/actionpack/lib/action_dispatch/journey/formatter.rb +++ b/actionpack/lib/action_dispatch/journey/formatter.rb @@ -58,9 +58,8 @@ module ActionDispatch !options.key?(part) || (options[part] || recall[part]).nil? } | route.required_parts - parameterized_parts.each do |bad_key, _| - next if keys_to_keep.include?(bad_key) - parameterized_parts.delete(bad_key) + parameterized_parts.delete_if do |bad_key, _| + !keys_to_keep.include?(bad_key) end if parameterize |