Rails: Devise: How can I edit user information? -
i have rails app set using devise, registration controller.
what's working far:
new user registration login logout home confirmation password reset
not working edit, in can't figure out url/rest call should making edit show up. have views/registrations/edit.html.erb page.
following portion of routes that's specific registration:
cancel_user_registration /cancel(.:format) registrations#cancel user_registration post / registrations#create new_user_registration /request_invite(.:format) registrations#new edit_user_registration /edit(.:format) registrations#edit following portion of routes.rb that's specific devise:
devise_for :users, :controllers => { :registrations => 'registrations', :confirmations => 'confirmations' }, :path => '', :path_names => { :sign_in => "login", :sign_up => "request_invite" } i tried following:
http://localhost:3000/edit http://localhost:3000/edit/:id http://localhost:3000/registrations/:id/edit http://localhost:3000/user/:id/edit i get: no route matches [get] ...
there couple of useful q&a sessions on stackoverfloww, not figure out how make advice here work me. ideas?
i typically add
resources :users, only: [:show, :edit, :update] this give /users/:id route (your profile), , can edit , update it. way, you're interacting user model would, outside of devise.
Comments
Post a Comment