Fix broken password reset email templates
Some checks failed
Some checks failed
Both templates called `@user.password_reset_token` and `@user.password_reset_token_expires_in`, which don't exist — `generates_token_for` only adds class-level helpers, not instance accessors. Every password reset email was failing at render time. Use `generate_token_for(:password_reset)` and a literal expiry string matching the 1-hour TTL on the token. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<p>
|
<p>
|
||||||
You can reset your password on
|
You can reset your password on
|
||||||
<%= link_to "this password reset page", edit_password_url(@user.password_reset_token) %>.
|
<%= link_to "this password reset page", edit_password_url(@user.generate_token_for(:password_reset)) %>.
|
||||||
|
|
||||||
This link will expire in <%= distance_of_time_in_words(0, @user.password_reset_token_expires_in) %>.
|
This link will expire in 1 hour.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
You can reset your password on
|
You can reset your password on
|
||||||
<%= edit_password_url(@user.password_reset_token) %>
|
<%= edit_password_url(@user.generate_token_for(:password_reset)) %>
|
||||||
|
|
||||||
This link will expire in <%= distance_of_time_in_words(0, @user.password_reset_token_expires_in) %>.
|
This link will expire in 1 hour.
|
||||||
|
|||||||
Reference in New Issue
Block a user