Add Email Confirmations to Your Rails App
Although this seems pretty easy, this is something that I have struggled with. In turn, I wanted to write a post so that if there is someone else out there struggling as well, they have some steps to help them out.
So you want to add email confirmations to your app? Great. Now how do you do that.
In this case, I am using devise. So these steps are for those using the devise gem in their rails app.
1. Update your users model by adding confirmable
When you set up devise, you probably made a user model. Go to that model and update the code by adding confirmable
devise :registerable, :confirmable
2. Generate a migration
Make sure that you generate a migration to add confirmable to your users table.
You can create a migration with code like this:
rails g migration add_confirmable_to_devise
In the migration file, you will need to add this, making selections for whether or not...