public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/JackDanger/rails.git
Fixed routing snafu

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1736 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Wed Jul 06 03:45:14 -0700 2005
commit  212cc3845a1eab76e55c2ddfc93cb3fc77b9c92b
tree    20c8b0027fc0f8de1558763b410aaafe9616f74d
parent  dc8989a42561e395b90b3113c2cd889e39087ec0
...
577
578
579
 
580
581
582
...
577
578
579
580
581
582
583
0
@@ -577,6 +577,7 @@ module ActionController
0
 
0
         def name_route(route, name)
0
           hash = route.known.symbolize_keys
0
+ hash[:controller] = "/#{hash[:controller]}"
0
       
0
           define_method(hash_access_name(name)) { hash }
0
           module_eval(%{def #{url_helper_name name}(options = {})
...
652
653
654
655
 
656
657
658
659
660
661
662
 
663
664
665
...
652
653
654
 
655
656
657
658
659
660
661
 
662
663
664
665
0
@@ -652,14 +652,14 @@ class RouteSetTests < Test::Unit::TestCase
0
   def test_basic_named_route
0
     rs.home '', :controller => 'content', :action => 'list'
0
     x = setup_for_named_route
0
- assert_equal({:controller => 'content', :action => 'list'},
0
+ assert_equal({:controller => '/content', :action => 'list'},
0
                  x.new.send(:home_url))
0
   end
0
 
0
   def test_named_route_with_option
0
     rs.page 'page/:title', :controller => 'content', :action => 'show_page'
0
     x = setup_for_named_route
0
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'new stuff'},
0
+ assert_equal({:controller => '/content', :action => 'show_page', :title => 'new stuff'},
0
                  x.new.send(:page_url, :title => 'new stuff'))
0
   end
0
 

Comments

    No one has commented yet.