I'm having an issue with the record identification. If I have a :has_one resource relationship mapped in routes.rb I can properly reference that in form_for with:
for example: @user.id = 2, @user.profile.id = 1
form_for ( [:user, @user.profile])
and it will create the proper route: .../user/2/profile/
and use @user.id for the :user_id
however if I try the same convention in link_to: link_to "link" [:user, @user.profile]
the format of the URL is different: .../user/1/profile/
It will use @user.profile.id for the :user_id instead. Any thoughts?
I am mapping the resource this way:
map.resources :users, :has_one => :profile
Any thoughts?