Ruby On Rails Lesson
A User Tour
Visiting the root url http://localhost:3000 shows the same default Rails page shown in Figure 1.3, but in generating the Users resource scaffolding we have also created a large number of pages for manipulating users. For example, the page for listing all users is at /users, and the page for making a new user is at /users/new. The rest of this
Table 2.1 The correspondence between pages and URIs for the Users resource
section is dedicated to taking a whirlwind tour through these user pages. As we proceed, it may help to refer to Table 2.1, which shows the correspondence between pages and URIs.
We start with the page to show all the users in our application, called index; as you might expect, initially there are no users at all (Figure 2.4).
To make a new user, we visit the new page, as shown in Figure 2.5. (Since the http://localhost:3000 part of the address is implicit whenever we are developing locally, I’ll usually omit it from now on.) In Chapter 7, this will become the user signup page.
Figure 2.4 The initial index page for the Users resource (/users).