TheOdinProject/theodinproject — pull request #76 by AbbyJonesDev (2014-05-05 01:50:26+00:00)
Title: Add email confirmation

Pivotal Tracker ID: https://www.pivotaltracker.com/story/show/69641194

New users receive receive a confirmation token in the welcome email, and step one asks them to confirm. They have a 2-day grace period before they have to confirm.

Existing users have continued access to the site, but they are prompted to confirm their email each time they login. The flash message includes a link they can click on to receive an email with a confirmation token. When they click it, the email is sent, and they are back on the courses page. After they confirm, the flash messages stop.

I customized the confirmation email to make it a little less generic - but more tweaking might not hurt. The flash messages might need a little more style, too. I just added the "alert" class to them.

I also adjusted the welcome email, so it would be good to have a second pair of eyes proofread it.

One concern - when I click the link to confirm in the emails, I get an error that the token is invalid. This happens in both the original Devise confirmation email and the custom emails. The tokens match each other and also match the information in the database, so this seems like a test-environment issue rather than an actual problem.

Another concern - I'm not sure how this will impact people who register via Github. I'm assuming Devise has this covered, but...?

Don't laugh when you read the last commit message. I wanted to clean up the migrations I created, but to do that, I had to pull a clean copy of the repo from my backup drive and start over again. Retracing my steps didn't take that long, but I messed up the very first one. I forgot to copy and paste the correct migration info into the new migration. Realized the mistake when all the tests were failing at the end. Sheesh.

I've pulled the latest commits from upstream, and all specs are passing.