Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8216

Show
Ignore:
Timestamp:
11/26/07 22:41:28 (1 year ago)
Author:
david
Message:

Fixed to_s bug with namespace routes (closes #10283) [johnb]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/routing.rb

    r8206 r8216  
    10131013        path = "#{path}/" unless path[-1] == ?/ 
    10141014 
    1015         path = "/#{options[:path_prefix].gsub(/^\//,'')}#{path}" if options[:path_prefix] 
     1015        path = "/#{options[:path_prefix].to_s.gsub(/^\//,'')}#{path}" if options[:path_prefix] 
    10161016 
    10171017        segments = segments_for_route_path(path) 
  • trunk/actionpack/test/controller/routing_test.rb

    r8206 r8216  
    19951995  end 
    19961996   
     1997  def test_setting_root_in_namespace_using_symbol 
     1998    assert_nothing_raised do 
     1999      set.draw do |map| 
     2000        map.namespace :admin do |admin| 
     2001          admin.root :controller => 'home' 
     2002        end 
     2003      end 
     2004    end 
     2005  end 
     2006   
     2007  def test_setting_root_in_namespace_using_string 
     2008    assert_nothing_raised do 
     2009      set.draw do |map| 
     2010        map.namespace 'admin' do |admin| 
     2011          admin.root :controller => 'home' 
     2012        end 
     2013      end 
     2014    end 
     2015  end 
     2016   
    19972017end 
    19982018