0
我有一個方法普通老式的Ruby方法不更新時間
def call
user.password_reset_sent_at = Time.zone.now
user.save!
user.regenerate_password_reset_token
UserMailer.password_reset(user).deliver_later(queue: "low")
end
def user
@user = User.find_by_email(@params)
end
,我想重置password_reset_token和password_reset_sent_at
User::PasswordReset.new("[email protected]").call
我看到令牌更新,但它不更新password_reset_sent_at