Changeset 8206
- Timestamp:
- 11/25/07 22:24:23 (1 year ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/routing.rb (modified) (1 diff)
- trunk/actionpack/test/controller/routing_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r8184 r8206 1 1 *SVN* 2 3 * Fixed that named routes living under resources shouldn't have double slashes #10198 [isaacfeliu] 2 4 3 5 * Make sure that cookie sessions use a secret that is at least 30 chars in length. [Koz] trunk/actionpack/lib/action_controller/routing.rb
r8169 r8206 1013 1013 path = "#{path}/" unless path[-1] == ?/ 1014 1014 1015 path = "/#{options[:path_prefix] }#{path}" if options[:path_prefix]1015 path = "/#{options[:path_prefix].gsub(/^\//,'')}#{path}" if options[:path_prefix] 1016 1016 1017 1017 segments = segments_for_route_path(path) trunk/actionpack/test/controller/routing_test.rb
r8169 r8206 1981 1981 end 1982 1982 1983 def test_named_route_in_nested_resource 1984 set.draw do |map| 1985 map.resources :projects do |project| 1986 project.comments 'comments', :controller => 'comments', :action => 'index' 1987 end 1988 end 1989 1990 request.path = "/projects/1/comments" 1991 request.method = :get 1992 assert_nothing_raised { set.recognize(request) } 1993 assert_equal("comments", request.path_parameters[:controller]) 1994 assert_equal("index", request.path_parameters[:action]) 1995 end 1996 1983 1997 end 1984 1998