I've got two controllers, ArticlesController and PagesController. Pages are nested inside articles with the usual map.resources nesting in config/routes.rb. Whilst using simply_helpful's form_for to create a new form for updating a page, I noticed that the URL it was generating for the form for submitting the change wasn't correct.
This patch changes that. Now, for nested controllers, you supply the nested objects as an array. For example:
<% form_for [@article, @page] do |f| %>
...
<% end %>
I've hacked around enough to retain the existing behaviour for non-nested forms.
I don't think it's the most elegant change on the planet, but I was hoping it might inspire somebody else to fix it properly. :-)
Cheers,
Graeme