7.6 Conclusion
Being able to sign up users is a major milestone for our application. Although the sample app has yet to accomplish anything useful, we have laid an essential foundation for all future development. In Chapter 8 and Chapter 9, we will complete our authentication machinery by allowing users to log in and out of the application (with optional “remember me” functionality). In Chapter 10, we will allow all users to update their account information, and we will allow site administrators to delete users, thereby completing the full suite of Users resource REST actions from Table 7.1.
7.6.1 What We Learned in This Chapter
Rails displays useful debug information via the debug method.
Sass mixins allow a group of CSS rules to be bundled and reused in multiple places.
Rails comes with three standard environments: development, test, and production.
We can interact with users as a resource through a standard set of REST URLs.
Gravatars provide a convenient way of displaying images to represent users.
The form_with helper is used to generate forms for interacting with Active Record objects.
Signup failure renders the new user page and displays error messages automatically determined by Active Record.
Rails provides the flash as a standard way to display temporary messages.
Signup success creates a user in the database and redirects to the user show page, and displays a welcome message.
We can use integration tests to verify form submission behavior and catch regressions.
We can configure our production application to use SSL for secure communications and Puma for high performance.