For the cases, where you have to use :confirmable
for user registration and want to avoid sending confirmation letters with invitation:
class User < ApplicationRecord
after_create :skip_confirmation_notification!, unless: Proc.new { self.invitation_token.nil? }
end