Florent1
(Florent)
July 24, 2009, 10:35pm
1
Hello,
Is it possible to define a RESTful route like “map.resources :projects” having the id parameter mapped to params[:project_id] instead of params[:id]?
I searched in http://api.rubyonrails.org/classes/ActionController/Resources.html but could not find an option for this.
Regards,
Florent
11175
(-- --)
July 28, 2009, 3:37pm
2
Florent Florent wrote:
Is it possible to define a RESTful route like "map.resources :projects"
having the id parameter mapped to params[:project_id] instead of
params[:id]?
If I understand your questions correctly this screencast from Ryan Bates
might help:
It may not be exactly what you're looking for, but it might help you get
there.
Florent1
(Florent)
July 29, 2009, 2:03am
3
Thanks Robert for your answer, even if it was not what I was looking for. Anyway meanwhile I found an alternative solution to my problem, and had no more to have the id parameter mapped to params[:project_id] instead of params[:id]?
Florent