Ruby On Rails Classroom image

Anil  Bist / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  ||
Lessons:-Exercises

  Exercises

1. Add tests for destroying relationships associated with a given user (i.e., as implemented by dependent :destroy in Listing 11.4 and Listing 11.16). Hint: Follow the example in Listing 10.15.

2. The respond_to method seen in Listing 11.38 can actually be hoisted out of the actions into the Relationships controller itself, and the respond_to blocks can be replaced with a Rails method called respond_with. Prove that the resulting code, shown in Listing 11.47, is correct by verifying that the test suite still passes. (For details on this method, do a Google search on ‘‘rails respond with’’.)

3. Refactor Listing 11.31 by adding partials for the code common to the following/ followers pages, the Home page, and the user show page.

4. Following the model in Listing 11.19, write tests for the stats on the profile page.

 

 
 
 
image
Anil  Bist

Skills    Ruby On Rails

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

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)