resources :users do
The <%= form_for @user, @listing %> will fail with undefined method user_listings_path
<%= form_for @user, @listing %>
Mentioned over here too http://geekninja.blogspot.com/2008/08/mapresources-hasone-formfor-surprise.html (pre rails 3? really?)
Will look into patching now.
I don't think it has ever worked to generated the proper url when using resource, in such cases you're supposed to give the url. url_for cannot reflect on routes to see if that's a resource or not.
I was thinking of patching it so that if the app does not respond_to user_listings_path (or whatever url polymorphic_url tries generating) fails, it will then try the singular version.
Any thoughts on this @carlosantoniodasilva / @rafaelfranca?
I think that @pixeltrix is working on this issue.
Yep, this is a duplicate of #1769 - closing in favour of that issue.