Creating the 'User' model. 

$ rails generate model User name:string email:string
Running the database migration command. 

$ rake db:migrate
Testing for the name and email attributes in the User model
Adding validations and tests for name and email for User model
Adding validation for name to be a maximum of 50 characters.
Adding email validation for the formatting
Adding uniqueness(and case sensitivity) for email attribute
Generating migration for adding index to User model
The migration code for enforcing email uniqueness
Running the database migration. 

$ rake db:migrate
Ensuring email uniqueness by downcasing the email attribute.
Adding 'bcrypt-ruby' gem to the Gemfile
Adding database migration and tests for the password_digest.

$ rails generate migration  add_password_digest_to_users password_digest:string
Running the database migration. 

$ rake db:migrate
Adding has_secure_password and adding tests.
Tests for password length and authenticate
Adding tests for emails addresses with mixed case to be saved in downcase
Alternative implemenation of the before_save callback.
Making the password checking the first in order
Updating regex to disallow double dots in email addresses.