Ruby On Rails Classroom image

Pooja  Negi / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3|Last
Lessons:-Partials

Listing 5.10 A partial for the site header.
app/views/layouts/_header.html.erb

 

                         

 

Now that we know how to make partials, let’s add a site footer to go along with the header. By now you can probably guess that we’ll call it _footer.html.erb and put it in the layouts directory (Listing 5.11).7

Listing 5.11 A partial for the site footer.
app/views/layouts/_footer.html.erb

 

                           

 

As with the header, in the footer we’ve used link_to for the internal links to the About and Contact pages and stubbed out the URIs with ’#’ for now. (As with header, the footer tag is new in HTML5.) We can render the footer partial in the layout by following the same pattern as the stylesheets and header partials (Listing 5.12

 

Listing 5.12 The site layout with a footer partial.

app/views/layouts/application.html.erb

 

                                      

 
 
 
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)