Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefines method utc in reset_password_period_valid? method #5646

Closed
jdonadob opened this issue Oct 20, 2023 · 3 comments
Closed

undefines method utc in reset_password_period_valid? method #5646

jdonadob opened this issue Oct 20, 2023 · 3 comments

Comments

@jdonadob
Copy link

undefines method utc for String. Recovering password, "reset_password_sent_at" variable contains a String value instead of Datetime value.

devise (4.9.2)
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]
Rails 7.0.6

@carlosantoniodasilva
Copy link
Member

reset_password_sent_at is supposed to be a date time column in the DB, are yours setup like that?

Also, Devise only sets this value here:

self.reset_password_sent_at = Time.now.utc
. Are you not setting it manually somewhere in the app?

@jdonadob
Copy link
Author

Thank you @carlosantoniodasilva. It was precisely that. By mistake, the reset_password_sent_at field was created as a string type.

@carlosantoniodasilva
Copy link
Member

👍 cool, glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants