public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Apply [5709] to stable

git-svn-id: 
http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6390 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
technoweenie (author)
Mon Mar 12 11:01:28 -0700 2007
commit  5552dadbb9fb35d923527badcedb2b5abd16d34a
tree    e15a4113f2f442456636d808395f17d11c4ce20f
parent  4a8d3d51f78b19993d3168d3c86e90e69c4a7ef4
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Apply [5709] to stable.
0
+
0
 * session_enabled? works with session :off. #6680 [Catfish]
0
 
0
 * Performance: patch cgi/session to require digest/md5 once rather than per #create_new_id. [Stefan Kaes]
...
344
345
346
347
 
348
349
350
 
351
352
353
...
1238
1239
1240
1241
 
1242
1243
1244
...
344
345
346
 
347
348
349
 
350
351
352
353
...
1238
1239
1240
 
1241
1242
1243
1244
0
@@ -344,10 +344,10 @@ module ActionController
0
         # the query string. (Never use keys from the recalled request when building the
0
         # query string.)
0
 
0
- method_decl = "def generate(#{args})\npath, hash = generate_raw(options, hash, expire_on)\nappend_query_string(path, hash, extra_keys(hash, expire_on))\nend"
0
+ method_decl = "def generate(#{args})\npath, hash = generate_raw(options, hash, expire_on)\nappend_query_string(path, hash, extra_keys(options))\nend"
0
         instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
0
 
0
- method_decl = "def generate_extras(#{args})\npath, hash = generate_raw(options, hash, expire_on)\n[path, extra_keys(hash, expire_on)]\nend"
0
+ method_decl = "def generate_extras(#{args})\npath, hash = generate_raw(options, hash, expire_on)\n[path, extra_keys(options)]\nend"
0
         instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
0
         raw_method
0
       end
0
@@ -1238,7 +1238,7 @@ module ActionController
0
         # drop the leading '/' on the controller name
0
         options[:controller] = options[:controller][1..-1] if options[:controller] && options[:controller][0] == ?/
0
         merged = recall.merge(options)
0
-
0
+
0
         if named_route
0
           path = named_route.generate(options, merged, expire_on)
0
           if path.nil?
...
1717
1718
1719
 
 
 
 
 
 
 
 
 
 
 
1720
1721
1722
...
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
0
@@ -1717,6 +1717,17 @@ class RouteSetTest < Test::Unit::TestCase
0
     )
0
   end
0
   
0
+ def test_query_params_will_be_shown_when_recalled
0
+ set.draw do |map|
0
+ map.connect 'show_post/:parameter', :controller => 'post', :action => 'show'
0
+ map.connect ':controller/:action/:id'
0
+ end
0
+ assert_equal '/post/edit?parameter=1', set.generate(
0
+ {:action => 'edit', :parameter => 1},
0
+ {:controller => 'post', :action => 'show', :parameter => 1}
0
+ )
0
+ end
0
+
0
 end
0
 
0
 class RoutingTest < Test::Unit::TestCase

Comments

    No one has commented yet.