Skip to content

Disable Sending A Confirmation Email

pjammer edited this page Oct 13, 2010 · 3 revisions

How to Disable the Confirmation Emails

In order to diable 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 

Clone this wiki locally