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