views:

41

answers:

1

Hi all,

I'm using devise for a web app and wanted to add the confirmable module to the site. However, since a confirmation_token isn't generated users can't sign in. When clicking the 'Didn't receive confirmation instructions?' link the token still isn't generated.

Confirmation email just generates this link (notice the lack of token in the url):

<p><a href="http://localhost:3000/users/confirmation"&gt;Confirm my account</a></p>

What is the best way to get this to work?

Many thanks,
Tony

A: 

Hi Tony:

I'm looking for the same answer. I suspect the answer may be that the data model includes whether or not each user is confirmed. It appears to add:

confirmation_token, confirmed_at, confirmation_sent_at

Also, the confirmable module appears to add these methods:

:confirmation_token, :confirmation_token=, :confirmation_token?, :confirmation_token_change, :confirmation_token_changed?, :confirmation_token_was, :reset_confirmation_token!, :confirmed_at, :confirmed_at=, :confirmed_at?, :confirmed_at_change, :confirmed_at_changed?, :confirmed_at_was, :reset_confirmed_at!, :confirmation_sent_at, :confirmation_sent_at=, :confirmation_sent_at?, :confirmation_sent_at_change, :confirmation_sent_at_changed?, :confirmation_sent_at_was, :reset_confirmation_sent_at!

So you could do it in the data model layer. I'm using Mongoid, so I just wrote a script that changes confirmed_at for each user to today.

Jade
This will apparently be fixed in Devise 1.0.8.Thankfully I only had to do it to a small set of users in a staging server. Thank you for the answer and help!
slythic