Ruby On Rails Classroom image

Anil  Bist / Professional / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  |1 | 2 | 3 | 4 | 5|Last
Lessons:- Edit Form

Edit Form

We start with the edit form, whose mockup appears in Figure 9.1.1 As usual, we’ll begin with some tests. First, note the link to change the Gravatar image; if you poke around the Gravatar site, you’ll see that the page to add or edit images is located at, so we test the edit page for a link with that URI.2

The tests for the edit user form are analogous to the test for the new user form in Listing 7.31 from the Chapter 7 exercises, which added a test for the error message on invalid submission. The result appears in Listing 9.1.



To write the application code, we need to fill in the edit action in the Users controller. Notefrom Table 7.1 that the proper URI for a user’sedit pageis /users/1/edit (assuming the user’s id is 1). Recall that theid of the user is availablein the params[:id] variable, which means that we can find the user with the code in Listing 9.2.

Anil  Bist

Skills    Ruby On Rails

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India

in 2006, i Join a web development company in Bangalore and start work on "Ruby on Rail" this is my first web development framework and we worked in this framework and develop four to five project after some time , I moved to JEE/Sturst frame work,

After some time i decided that now times come and I have to go on in my own way and I started a company name is "Soarlogic&q


  Students (0)