Q: Skip confirmation mail in devise I want to skip the sending of confirmation mail from devise in my rails 4 application. I tried so many things, but none of them worked.
In my user.rb
before_create :my_method

def my_method
    self.skip_confirmation
end

I tried this also
before_create :my_method

def my_method
    !confirmed
end

I tried removing :confirmable from user.rb but none of them seems to work. Thanks in advance :)

A: 
Note: If you want to skip only on certain places

If you are calling User.create before skip_confirmation!, you need to call User.new and user.save.
 @user = User.new(:first_name => "John", :last_name => "Doe")
 @user.skip_confirmation!
 @user.confirm!
 @user.save

A/C to your way
before_create :my_method

def my_method
    self.skip_confirmation!
    self.confirm!
end


excluding the term confirmable in devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable should skip in a whole


A: Try this
@user = User.new(:email => 'email@example.com', :password => 'password') 
@user.skip_confirmation_notification!
@user.save

skip_confirmation_notification! generate a confirmation token but does not send confirmation email.

A: Try adding this to user.rb
protected

def confirmation_required?
 false
end


A: For every User instance:
class User < ApplicationRecord
  after_initialize do |user|
    user.skip_confirmation_notification!
  end
end

For some particular instance:
john = User.new
john.skip_confirmation_notification!

P.S. The answers above are about disabling the confirmation process entirely, whereas the author asked about disabling just sending an email.
