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
reblog
Setting Up Mailer Using Devise For Forgot Password
Really cleared up my confusion about sending email in both development and production environments.
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
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
when you installed devise.
Next you should turn on the option to raise an exception if there is an error when sending an email. You can do this by including
config.action_mailer.raise_delivery_errors = true
in the same file. Next we will add the email delivery method. You should leave the values as…
View original post 672 more words