Rails: Devise: How can I edit user information?

前端 未结 1 1774
天命终不由人
天命终不由人 2021-01-12 19:56

I have a Rails app set up using Devise, with a Registration controller.

What\'s working so far:

New user registration Login Logout Home About Confirmation P

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-12 20:15

    I typically just add a

    resources :users, only: [:show, :edit, :update]
    

    This will give you a /users/:id route (your profile), and can edit and update it. That way, you're interacting with the User model just as you normally would, outside of Devise.

    0 讨论(0)
提交回复
热议问题