Ruby On Rails Classroom image

Anil  Bist / 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 ",  '#'  % >

 

to

< % =   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).

 
 
 
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)