Ruby On Rails Classroom image

prateek  darmwal / 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
prateek  darmwal

Skills    Ruby On Rails

Qualifications :- High School - S.K.M. Sn. Sec. School, Haldwani, College/University - Graphic Era Hill University, Bhimtal,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- I like to explore new technologies. I have skills in ruby on rails, php5, cakephp, jquery, javascript, html/css, java, c & c++. I love coding
Explore
 

  Students (0)