Ruby On Rails Classroom image

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