Debug and Rails environments: Adding some debug information to the site layout, using <%= debug() %>
A Users resource: Enable REST-style URLs by adding 'resources :users' in routes file

HTTP request  URL             Action  Named route
GET           /users          index   users_path
GET           /users/1        show    user_path(user)
GET           /users/new      new     new_user_path
POST          /users          create  users_path
GET           /users/1/edit   edit    edit_user_path(user)
PATCH         /users/1        update  user_path(user)
DELETE        /users/1        destroy user_path(user)

(refer to table 7.1 in the tutorial boook)
A Users resource: Add method 'show' in UsersController & add show.htrm.erb under app/views/users, so now URL /users/1 works (if you insert one entry into the development db table users under rails console)
Testing the user show page (with factories): A test case for user show page (test data are inserted using FactoryGirl)
Testing the user show page (with factories): Get the test green by adding a title and heading for the user profile page
Testing the user show page (with factories): Speed up tests by redefining the Bcrypt cost factor in a test environment
A Gravatar image and a sidebar: Add Gravatar image url to the views/users/show.html.erb
A Gravatar image and a sidebar: Adding a sidebar to the user show view, and style it using Bootstrap & customer scss
Signup form: Add failing test cases for user signup
Using form_for: Add a form in view to sign up new users
The case pass again: 'rspec spec/requests/user_pages_spec.rb -e "signup page"'
But not all test cases pass because click on "Create my account" button results in error
Using form_for: CSS for the signup form
A working form (theoretically):  Add a create action in UsersController that can handle signup failure (but not success)

Pay attention to the use of 'render' in controller code

But the test cases are still failing with 'ActiveModel::ForbiddenAttributesError'
If you submit the form in UI, you will get the same error
This is because starting from Rails 4.0, mass assignment code (i.e. initializing objects using a hash argument) like 'User.new(params[:user])' will lead to error because of security concern
The security concern is: If we later introduce a new attribute to User model (e.g. 'admin'), and if user.admin == true, it indicates admin is signing in the website. Now the client could easily construct such an HTTP POST, setting admin = '1' as part of params[:user], to gain admin access (use command-lint HTTP client 'curl' could accomplish this task)
Strong parameters: Using strong parameters in the create action, so that this test case passes 'rspec spec/requests/user_pages_spec.rb -e "signup with invalid information"'
But the test case "signup with valid information" still fails because there's no (nor should there be) view named 'create'
Signup error messages: Display error messages above the form when signing up with invalid parameters
Signup success: Redirect to user show page if sign up success (here named route helper method 'user_url' is used instead of 'user_path')
Signup success: and 'user_url' could be omitted in the redirect_to
The flash: Adding a flash message to user signup

The 'flash' is a special rails variable which is used for displaying a message on subsequent page and disappears upon visting a second page or page reload
Deploying to production with SSL: Add SSL in production
Merge branch 'ruby200'

Conflicts:
	Gemfile