class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  validates :email, presence: true, uniqueness: {case_sensitive: false}

  has_many :comments, :foreign_key => 'author_id'
end

class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable,
         :confirmable

  validates :email, presence: true, uniqueness: {case_sensitive: false}

  has_many :comments, :foreign_key => 'author_id'
end

Add confirmable module to User model
Add confirmable module to User model

Add devise's confirmable module to the User model. This will allow
confirmation of accounts by email after creation.
