Ruby On Rails Classroom image

prateek  darmwal / 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
prateek  darmwal

Skills    Ruby On Rails

Qualifications :- High School - S.K.M. Sn. Sec. School, Haldwani, College/University - Graphic Era Hill University, Bhimtal,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- I like to explore new technologies. I have skills in ruby on rails, php5, cakephp, jquery, javascript, html/css, java, c & c++. I love coding
Explore
 

  Students (0)