The helper form_for does not work for nested singleton
resource in
Rails 2.0
Given below nested singleton resource profile,
map.resources :users do |user|
user.resource :profile
end
<% form_for([ user, profile]) do |f| %>
actually expects to get the url from helper
"user_profileS_url ",
instead of "user_profile_url". The latter url
helper is the one
generated by routes.rb.
<% form_for([:user, profile]) do |f| %> generates url like
/user/
profile, which is for named route, not for singleton
resource.
Any idea?
Steven
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails" group.
To post to this group, send email to rubyonrails googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-unsubscribe googlegroups.com
For more options, visit this group at http://gro
ups.google.com/group/rubyonrails
-~----------~----~----~----~------~----~------~--~---
|