This is probably the worst part in development - this is creating a custom edit profile path. The reason for this is that when you try to update your resource, it will send you back to the default path for editing the user, that is, if you get errors.
What I would like to suggest is that you save the default path / edit the path and then edit the associations, not the actual resources. Otherwise, you will have to dig up a gem and rewrite user editing paths.
This is what I did.
In the user model user.rb
has_one :profile has_many :notices
Then you can have a notices and profiles controller where you edit the ones, not the user or resource , which you did with the help of the program helpers, and this will make configuration difficult. Create hidden_field f.hidden_field :user_id, :value => current_user.id for these forms and it will save the user when creating it and update it, etc.
thenengah
source share