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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---