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 combine RSpec with the remarkable Webrat utility 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™ 2.3 Tutorial: Learn Rails by Example now with O’Reilly online learning.

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