Chapter 8. Sign Up

Now that we have a working User model, it’s time to add an ability few websites can live with out: letting users sign up for the site—thus fulfilling the promise implicit in Section 5.3, “User signup: A first step”. We’ll use an HTML form to submit user signup information to our application in Section 8.1, which will then be used to create a new user and save its attributes to the database in Section 8.3. As usual, we’ll write tests as we develop, and in Section 8.4 we’ll use RSpec’s support for web navigation syntax to write succinct and expressive integration tests.

Since we’ll be creating a new user in this chapter, you might want to reset the database to clear out any users created at the console (e.g., in Section 7.3.2 ...

Get Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.