aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-12-09 04:42:32 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-12-09 04:42:32 +0000
commitd1a2449220303f24da0d70504f5959635730da88 (patch)
treeceeff500414011255dc8cea82cbf108d79eb48f8 /actionpack/lib/action_controller/routing.rb
parenta50fc11583ee723e88dee59590496ddf1433e656 (diff)
downloadrails-d1a2449220303f24da0d70504f5959635730da88.tar.gz
rails-d1a2449220303f24da0d70504f5959635730da88.tar.bz2
rails-d1a2449220303f24da0d70504f5959635730da88.zip
Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index b0d0dbcf57..8ae1cb06d9 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -333,10 +333,10 @@ module ActionController
# the query string. (Never use keys from the recalled request when building the
# query string.)
- method_decl = "def generate(#{args})\npath, hash = generate_raw(options, hash, expire_on)\nappend_query_string(path, hash, extra_keys(hash, expire_on))\nend"
+ method_decl = "def generate(#{args})\npath, hash = generate_raw(options, hash, expire_on)\nappend_query_string(path, hash, extra_keys(options))\nend"
instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
- method_decl = "def generate_extras(#{args})\npath, hash = generate_raw(options, hash, expire_on)\n[path, extra_keys(hash, expire_on)]\nend"
+ method_decl = "def generate_extras(#{args})\npath, hash = generate_raw(options, hash, expire_on)\n[path, extra_keys(options)]\nend"
instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
raw_method
end
@@ -1224,7 +1224,7 @@ module ActionController
# drop the leading '/' on the controller name
options[:controller] = options[:controller][1..-1] if options[:controller] && options[:controller][0] == ?/
merged = recall.merge(options)
-
+
if named_route
path = named_route.generate(options, merged, expire_on)
raise RoutingError, "#{named_route_name}_url failed to generate from #{options.inspect}, expected: #{named_route.requirements.inspect}, diff: #{named_route.requirements.diff(options).inspect}" if path.nil?