Ruby On Rails Classroom image

Neha  Jaggi / Professional / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  |1 | 2 | 3 | 4|Last
Lessons:- A User Tour

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


URI                                      Action                                         Purpose
/users                                   index                                         page to list all users
/users/1                                 show                                         page to show user with id 1
/users/ new                            new                                          page to make a new user
/zusers/1/edit                         edit                                           page to edit user with id 1

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

Neha  Jaggi

Skills    Ruby On Rails

Qualifications :- High School - , College/University - Graphic Era Hill University, Dehradun, College/University - ,
Location :-Dehradun,Dehradun,UTTARAKHAND,India

Experienced Software Developer with a demonstrated history of working in the Information Technology and services industry. Skilled in Web Technologies (Ruby on Rails, PostgreSQL, php, Laravel and AJAX). 


  Students (0)