I have developed a basic rails 3.2 app using devise (2.2.3) for authentication. Now I need to add support for the user account/profile settings. The additional attributes (of profile/account) that can be updated by the end user are part of the User model.
I need suggestion on how this can be supported? Which action of the UsersController would meet the requirement? I added an edit action in the UsersController for the same. When I run 'rake routes', I get the following
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel user_registration POST /users(.:format) devise/registrations#create new_user_registration GET /users/sign_up(.:format) devise/registrations#new edit_user_registration GET /users/edit(.:format) devise/registrations#edit PUT /users(.:format) devise/registrations#update DELETE /users(.:format) devise/registrations#destroy edit_user GET /users/:id/edit(.:format) users#edit user GET /users/:id(.:format) users#show root / home#index
When the edit form is submitted, the form sends a message to "/users/1/edit" with PUT and I get the routing error that No route matches [PUT] "/users/1/edit"
Is this the right way to modify the user settings? Should the form be posted with "PUT"? If so, how do I make a route entry with PUT instead of GET as above?
Thanks in advance.