Ruby On Rails Classroom image

Pooja  Negi / Student / 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
Pooja   Negi

Skills    Ruby On Rails

Qualifications :- High School - SSN high school, College/University - HNBGU, College/University - SRHU,
Location :-Ranipokhari,Rishikesh,Uttarakhand,India
Description:- Student
Explore
 

  Students (0)