app/models/user.rb
# Sends an email to the user with a password reset link.
Sends an email to the user with a password reset link.
Sends an email to the user with a password reset link .
def send_password_reset_email
    self.reset_token = User.new_token
    update_attribute :reset_digest, User.digest(self.reset_token)
    update_attribute :reset_sent_at, Time.now
    UserMailer.password_reset(self).deliver_now
  end
def send_password_reset_email self . reset_token = User . new_token update_attribute :reset_digest , User . digest ( self . reset_token ) update_attribute :reset_sent_at , Time . now UserMailer . password_reset ( self ) . deliver_now end
Sends an email to the user with a password reset link.
Sends an email to the user with a password reset link .