Skip devise email confirmation on update
There is a situation where you want to change the email of the user as an admin for example so to achieve that you can use this kind of code in your model:
# models/users.rb
def postpone_email_change?
false
end
This will disable email reconfirmation on update.
Written by Ciocanel Razvan
Related protips
1 Response
You can also use:
in config/devise.rb
# If true, requires any email changes to be confirmed (exctly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed new email is stored in
# unconfirmed email column, and copied to email column on successful
# confirmation.
config.reconfirmable = false
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#