简体   繁体   中英

Customizing “edit user page” in Devise

I want customize a user "edit profile" page in Devise. In particular, I want to disallow a user to edit their email address. I can't find that kind of information in their wiki. How can I do that?

2 quick answers:

  1. You could just create your own controller and views to update profile information. I'd assume there might be more fields related to a user profile than just those related to devise.

  2. Run rake routes to check what routes devise has given you already. You may already have the views to do this, and just not know it.

  3. Run $ rails generate devise:views -v registrations to copy their views over to your application.

Devise documenation: configuring views

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM