Ruby On Rails Classroom image

Pooja  Negi / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2|
Lessons:-Layout Links

The application code parallels the addition of the About page in Section 3.2.2: first we update the routes (Listing 5.17), then we add a contact action to the StaticPages controller (Listing 5.18), and finally we create a Contact view (Listing 5.19).

 

Listing 5.17 Adding a route for the Contact page.
config/routes.rb

                                     

 

 

Listing 5.18 Adding an action for the Contact page.
app/controllers/static_pages_controller.rb

 

                                     

 

Listing 5.19 The view for the Contact page.
app/views/static_pages/contact.html.erb

 

                      

 

Now make sure that the tests pass:


$ bundle exec rspec spec/requests/static pages spec.rb
 
 
 
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)