You are previewing Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example.

Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example

Cover of Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example by Michael Hartl Published by Addison-Wesley Professional
O'Reilly logo

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 ...

The best content for your career. Discover unlimited learning on demand for around $1/day.