7.2.2 Using form_for

Now that we have good failing tests for user signup, we’ll start getting
them to pass by making a form for signing up users. We can accomplish
this in Rails with the form_for helper method, which takes in an Active
Record object and constructs a form using the object’s attributes. The
result appears in Listing 7.17. (Readers familiar with Rails 2.x should
note that form_for uses the “percent-equals” ERb syntax for inserting
content; that is, where Rails 2.x used <% form_for ... %>, we now use
<%= form_for ... %> instead.)