search for: new_user_task

Displaying 1 result from an estimated 1 matches for "new_user_task".

2007 Nov 21
6
route_for and nested resources
...following doesn''t work: route_for(:controller => :task, :action => :new, :user_id => 1).should == "/users/1/task/new" (fails) route_for(:controller => :task, :action => :new, :user_id => 1).should == "/task/new?user_id=1" (passes) Or do you just use: new_user_task(1,1).should == "/users/1/task/new" I haven''t been able to find that much documentation on the route_for method that lists any ways of creating the nested route url. Thanks. -- Posted via http://www.ruby-forum.com/.