Ruby On Rails Classroom image

Anil  Bist / 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
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)