diff options
Diffstat (limited to 'actionpack/lib/action_controller/routing/optimisations.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing/optimisations.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/routing/optimisations.rb b/actionpack/lib/action_controller/routing/optimisations.rb index 0a87303bda..4522ebcb1a 100644 --- a/actionpack/lib/action_controller/routing/optimisations.rb +++ b/actionpack/lib/action_controller/routing/optimisations.rb @@ -106,12 +106,8 @@ module ActionController # argument class PositionalArgumentsWithAdditionalParams < PositionalArguments def guard_conditions - [ - "args.size == #{route.segment_keys.size + 1}", - "!args.last.has_key?(:anchor)", - "!args.last.has_key?(:port)", - "!args.last.has_key?(:host)" - ] + ["args.size == #{route.segment_keys.size + 1}"] + + UrlRewriter::RESERVED_OPTIONS.collect{ |key| "!args.last.has_key?(:#{key})" } end # This case uses almost the same code as positional arguments, |