Rails, DEVISE - Preventing a user from changing their email address

后端 未结 3 1048
囚心锁ツ
囚心锁ツ 2021-01-15 06:29

When a user registers on my app they have to confirm their email, powered by Devise + Rails 3.

The email address defines the user\'s permissions so I don\'t want the

3条回答
  •  独厮守ぢ
    2021-01-15 07:15

    I would personally leave the attr_accessible for :email and just remove the email field from the edit view. Also, you will want to strip out any email param from the params hash in the update action.

提交回复
热议问题