Last Updated: February 25, 2016
·
5.008K
· chocksy

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.

1 Response
Add your 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 ·