diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-11-28 04:11:37 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-11-28 04:11:37 +0000 |
commit | 6a611e1e95ceec43473d2310678bfd6156899b7a (patch) | |
tree | efc10f27d9154dec0a62218bdd0760aac1fa7a84 /actionpack/lib | |
parent | 45d679bcb881adf8782230ff3b14ebc3a8d20e7b (diff) | |
download | rails-6a611e1e95ceec43473d2310678bfd6156899b7a.tar.gz rails-6a611e1e95ceec43473d2310678bfd6156899b7a.tar.bz2 rails-6a611e1e95ceec43473d2310678bfd6156899b7a.zip |
Make sure the optimisation code for routes doesn't get used if :host, :anchor or :port are provided in the hash arguments. [pager, Koz] Closes #10292
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/routing_optimisation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing_optimisation.rb b/actionpack/lib/action_controller/routing_optimisation.rb index 9b109dce60..57c248a146 100644 --- a/actionpack/lib/action_controller/routing_optimisation.rb +++ b/actionpack/lib/action_controller/routing_optimisation.rb @@ -97,7 +97,7 @@ module ActionController # argument class PositionalArgumentsWithAdditionalParams < PositionalArguments def guard_condition - "defined?(request) && request && args.size == #{route.segment_keys.size + 1}" + "defined?(request) && request && args.size == #{route.segment_keys.size + 1} && !args.last.has_key?(:anchor) && !args.last.has_key?(:port) && !args.last.has_key?(:host)" end # This case uses almost the Use the same code as positional arguments, |