haseeb haseeb - 6 months ago 17
Ruby Question

Where to put @user.skip_confirmation! in devise signup

I want to skip confirmation email in signup and want to send manually. To skip I will do

@user.skip_confirmation!


But where to write this line?

Answer

Use ActiveRecord::Callbacks#before_create

Write this in your User model

before_create :my_method

def my_method
 self.skip_confirmation!
end