Invalid confirmation token message not shown with simple_form #2143

Merged
merged 2 commits into from Nov 19, 2012

2 participants

@luisico

Hi all,

When using Devise confirmable with simple_form, if a user tries to confirm with an invalid token, no meaninful error message is displayed, just the page to resend the confirmation email.

The problem, as I see it, is that the template for this view does not present the attribute :confirmation_token, and therefore #error_notification doesn't display the error, although it does output that something went wrong.

This can easily be fixed adding the full error for this attribute with:

<%= f.full_error :confirmation_token %>

Best,
Luis

@luisico luisico Show invalid confirmation token message
fixes #2143

Attribute confirmation token is not present in the simple_form template,
therefore not being displayed by #error_notification.
This fix explicitily call #full_error on :confirmation_token.
ed6f2ab
@josevalim
Plataformatec member

@luisico could you please send a pull request? We have the same issue in the reset password and unlock views as well. Thansk a lot!

@luisico luisico Show invalid unlock token message
Attribute unlock token is not present in the simple_form template,
therefore not being displayed by #error_notification.
This fix explicitily call #full_error on :unlock_token.
0415564
@josevalim josevalim merged commit 6c2c808 into plataformatec:master Nov 19, 2012

1 check passed

Details default The Travis build passed
@oki oki added a commit to oki/devise that referenced this pull request Jan 29, 2013
@luisico luisico Show invalid confirmation token message
fixes #2143

Attribute confirmation token is not present in the simple_form template,
therefore not being displayed by #error_notification.
This fix explicitily call #full_error on :confirmation_token.
82ae2be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment