Skip to content

Disable Sending A Confirmation Email

Ivo Benedito edited this page Dec 29, 2017 · 3 revisions

How to Disable the Confirmation Emails

In order to disable the confirmation emails from going out, you simply need to create an after_create callback method and overwrite the send_confirmation_email method.

Put the following code into your User model. This code below works on the tested application using 0.8.8.

class User < ActiveRecord::Base
  include Clearance::User

  after_create :confirm_user

  def send_confirmation_email#deliver_confirmation_email 
    # Do Nothing 
    # or MyMailer.deliver_thank_you self 
  end

  private 

  def confirm_user 
    confirm_email! 
  end
end