Ruby On Rails Classroom image

prateek  darmwal / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3|
Lessons:-Requiring the Right User

The correct_user filter uses the current_user? boolean method, which we define in the Sessions helper (Listing 9.16).

 

 

Listing 9.15 also showsthe updated edit and update actions. Before, in Listing 9.2, we had

def  edit
    @user =  User.find(params [:id] )
end

 

and similarly for update. Now that the correct_user before filter defines @user, we can omit it from both actions.
        Before moving on, you should verify that the test suite passes: 

$ bundle exec rspec spec/

 

 

 
 
 
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)