Change param name to nested resource parent
Posted
by Stefano Verna
on Stack Overflow
See other posts from Stack Overflow
or by Stefano Verna
Published on 2010-06-06T10:19:05Z
Indexed on
2010/06/06
10:22 UTC
Read the original article
Hit count: 378
I have this routes:
resources :tags do
resources :comments
end
so the :create action for the comments has the following form
tag_comments POST /tags/:tag_id/comments(.:format)
how can i change the paramenter name from :tag_id to :commentable_id?
© Stack Overflow or respective owner