DB中有这样的行(来自模式):
t.datetime "password_link_sent_at"
和回调:
self.password_link_sent_at = Time.now
但是输出是错误的:
Started PUT "/email_password" for 127.0.0.1 at 2013-05-22 03:22:42 +0400
Processing by SignsController#email_password as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"10qxpSGYRAKs/SqbWyG2IstRxpIe4VoOT96hNANq9Tk=", "email_reset"=>"user_mail@mail.ru", "commit"=>"Reset Password"}
User Load (6.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'user_mail@mail.ru' LIMIT 1
User Exists (1.0ms) SELECT 1 AS one FROM "users" WHERE "users"."password_reset_token" = '2kE2dtwlnsMrnCGTIGuCvQ' LIMIT 1
(1.0ms) BEGIN
(1.0ms) UPDATE "users" SET "password_reset_token" = '2kE2dtwlnsMrnCGTIGuCvQ', "password_link_sent_at" = '2013-05-21 23:22:43.167461', "updated_at" = '2013-05-21 23:22:43.175461' WHERE "users"."id" = 1
(5.0ms) COMMIT
Rendered user_mailer/password_reset.text.erb (1.0ms)
关注请求时间,关注password_link_sent_at
自身,关注更新时间。哪个更早4小时。