app/models/user.rb
# validates an email for a newly registered user
validates an email for a newly registered user
validates an email for a newly registered user
def validate_email
    self.email_confirmed = true
    self.update(confirmed_at: DateTime.now)
    self.confirmation_token = nil
  end
def validate_email self . email_confirmed = true self . update ( confirmed_at : DateTime . now ) self . confirmation_token = nil end
validates an email for a newly registered user
validates an email for a newly registered user