When you nest REST resources,
map.resources :articles do |article|
the scaffold_resource generated code has to be manually edited to add
the parent id in about 15 locations accross 5 files of the child (the 4
views and the controller).
Most of the time, you must just replace
in new.rhtml you need to add a hidden field, and
<%= f.hidden_field :article_id , :value => @article.id%>
in the controller you also have to add a filter to fetch the parent
@article= Article.find params[:article_id]
Question: Am I doing something wrong/is there a simpler way?
(note: I noticed that some xxx_path() can be left untouched, but as my
next step will be to try using REST with polymorphic association, I
tried to be consistent and I fixed them all).