Ruby On Rails Classroom image

Neeraj  Amoli / 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
Neeraj  Amoli

Skills    Ruby On Rails

Qualifications :-
Location :-Dehradun,Dehradun,Uttrakhand,India
Description:-

I have 3 year experience as a Software Engineer. My Skilled are Android Development (Java), ROR Development .   


Explore
 

  Students (0)