Ruby On Rails Classroom image

Neha  Jaggi / Professional / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  |1 | 2|Last
Lessons:- Named Routes

Named Routes

Let’s put the named routes created in Section 5.3.2 to work in our layout. This will entail filling in the second arguments of the link_to functions with the proper named routes. For example, we’ll convert


< % =    link -to   " About ",  '#'  % >



< % =   link- to  "About" ,  about  path  %>  


and so on.

              We’ll start in the header partial, _header.html.erb (Listing 5.24), which has links to the Home and Help pages. While we’re at it, we’ll follow a common web convention and link the logo to the Home page as well.  





We won’t have a named route for the ‘‘Sign in’’ link until Chapter 8, so we’ve left it as ’#’ for now.

             The other place with links is the footer partial, _footer.html.erb, which has links for the About and Contact pages (Listing 5.25).

Neha  Jaggi

Skills    Ruby On Rails

Qualifications :- High School - , College/University - Graphic Era Hill University, Dehradun, College/University - ,
Location :-Dehradun,Dehradun,UTTARAKHAND,India

Experienced Software Developer with a demonstrated history of working in the Information Technology and services industry. Skilled in Web Technologies (Ruby on Rails, PostgreSQL, php, Laravel and AJAX). 


  Students (0)