RailsCasts Episode #250: Authentication from Scratch (revised) http://railscasts.com/episodes/250-authentication-from-scratch-revised Requires Ruby 1.9.2 or higher. Commands used in episode. rails g resource user email password_digest rake db:migrate rails g controller sessions new