Rails Devise: after_confirmation
Just define an after_save callback that checks if the user is verified, and if so, sends an email.
If you want to save several processor cycles, you can override the ConfirmationController element with something like this:
class ConfirmationsController < Devise::ConfirmationsController def show self.resource = resource_class.confirm_by_token(params[:confirmation_token]) if resource.errors.empty? set_flash_message(:notice, :confirmed) if is_navigational_format? sign_in(resource_name, resource)
source share