reblog

I’ve been using the Devise gem for a couple apps in my recent exploration of Ruby on Rails.  It works pretty well and has a lot of great features but the documentation on how to best go about setting up administrators on it is a bit vague.  I would write up some notes on how to do it but I’d basically be plagiarizing another post on the matter which really cleared things up for me.  Check it out: http://jonallured.com/2011/04/30/using-devise-for-admin-accounts.html

In this tutorial I will show you how to set up the mailer for the forgot password feature in Devise.  In the tutorial I will be setting up a Gmail account and I will show you how its done using local environment variables.  I will also be using Heroku and Foreman to set up environment variables. 

I am using Rails 4 and Devise 3 for this tutorial. 

Seting Up Development Environment

First we will set up the development mailer for use on your local machine.  In “config/environments/development.rb” you should already have included