I am wondering how to pass parameters to route declarations. I have an
app where one project belongs to a user. In one of my integration tests,
I want to check that the template being rendered is the one where the
"logged in user" can register a project:

get new_user_project_path(:user) #does not work
#assert_template '/users/:id/project/new' #id must be this user's id,
how?
assert_template 'projects/new' #true, but must be /user/:id/project/new

rake routes says:

POST   /users/:user_id/project
{:action=>"create", :controller=>"projects"}

new_user_project GET   /users/:user_id/project/new
{:action=>"new", :controller=>"projects"}

Thanks,
Vahagn
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to