Is it possible to fine-tune reconfirmable?

265 views
Skip to first unread message

Larry

unread,
Feb 1, 2012, 4:42:08 PM2/1/12
to Devise
Hi,

I just upgraded to Devise 2.0 (with Rails 3.2) and am using the new
"reconfirmable" feature for a user changing his email address. This is
a smart feature to put in - thanks for doing so! (Heck, thanks for the
entire great gem!)

Anyway, I was wondering if it is possible to fine-tune this feature;
all other features seem to be configurable, but I don't see any way to
change things for this option.

The doc says that when a user changes his email address that the
procedure is exactly the same as when joining the site. And that is
how it has worked for me. However, the messages for a typical sign-up
thread just seem really "off" and confusing when used for changing
one's email address.

For example, here are the messages I (and I don't think it's a stretch
to say many others) might use for this process:

1) Action: User changes email address in edit form.
Message: You updated your account successfully, but we need to
verify your new email address. Please check your email and click on
the confirm link to finalize confirming your new email address.

That's not bad, but there doesn't seem to be an entry for this in the
devise.yml file (like there is for every other message). Is there a
way to customize this message?

2) Action: Confirmation email gets sent.
Message: I think a typical email for account-creation might say
something like "We received a request to create a new account. Please
confirm by clicking blah blah blah".
Creating an account and changing an email address are two entirely
different things. Is there a way to specify a new
"change_email_instructions" email skeleton like we can do for
"reset_password_instructions"?

3) Action: User clicks the link in the confirmation email.
Message: Good chance it's something like this for account-creation:
"Your account was confirmed and you are now signed in. Thanks for
joining our site!"
Again, joining the site for the first time and changing your email
address are two entirely different actions - is there a way to change
this message?

I know you people must have worked hard on getting this major release
out, and I hate to whine about it (because I really am grateful for
what you've given our community), but it seems that as of now my only
options are to change the email (2) and message (3) to say something
like "Someone requested to either join our site or change their email
address" and "Thanks for either joining or site or changing your email
address!" - both of which just seem... well, not good.

Thanks,
Larry

radhames brito

unread,
Feb 7, 2012, 7:22:39 AM2/7/12
to plataforma...@googlegroups.com

Again, joining the site for the first time and changing your email
address are two entirely different actions - is there a way to change
this message?


Just provide a locale file, and all messages will be replaced with whatever you put in that file.

https://github.com/plataformatec/devise/wiki/I18n

https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0

 

Larry

unread,
Feb 8, 2012, 10:43:59 AM2/8/12
to Devise
Hi,

Thanks for your reply. You were right about providing a locale file -
I have one, but just forgot to re-run the Devise:Install generator
when I upgraded, which means I did not see the new key for
'registrations > update_needs_confirmation'. Duh. (And sorry!)

While that does take care of customizing the change-email message,
what about the subsequent confirmation email that is sent out and the
message one gets after clicking the 'confirm' link in that email?

In Devise, resetting one's password is considered entirely different
from joining the site: it has its own mailer skeleton and flash
messages. However, the only thing "different" between changing one's
email and joining the site is that one message in the i18n file. The
confirmation email and the message one gets after clicking the
'confirm' link in that email are the same as when one joins the site.

So again, it seems that the email that gets sent out has to say
something like "We have received a request to either join our site or
change an email address. etc." and the message one gets after clicking
the 'confirm' link in that email has to say something like "Thanks for
either joining our site or changing your email address!"

So I guess 2/3rd of my original question still remains: Is there a way
to customize the email and confirmation-message that one gets when
simply changing an email address (as opposed to joining the site)?

Thanks,
Larry
> https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devis...

Bryan M

unread,
Mar 18, 2012, 11:08:48 AM3/18/12
to Devise
Hello all - This is where I'm at as well - I'd love to see what the
best practice is for splitting up the confirmation email and the
reconfirmation email. If Devise already provides the API to do this, I
don't want to write functionality that already exists.

FWIW: Any somewhat savvy business owner would catch this as a bug.
Reply all
Reply to author
Forward
0 new messages