aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index a537ed09b8..3d3299afb3 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -176,12 +176,13 @@ module ActionDispatch
end
end
- @conditions[:required_defaults] = []
+ required_defaults = []
options.each do |key, required_default|
unless segment_keys.include?(key) || IGNORE_OPTIONS.include?(key) || Regexp === required_default
- @conditions[:required_defaults] << key
+ required_defaults << key
end
end
+ @conditions[:required_defaults] = required_defaults
via_all = options.delete(:via) if options[:via] == :all