October 16th, 2010, 11:47 PM
Join Date: Oct 2010
Location: Toronto, Canada
Time spent in forums: 1 h 11 m 7 sec
Reputation Power: 0
Rails: Modifying <head> to include various metas and title tags
I've been learning Ruby these past few days and I'm really liking it. I'm still sort of confused by rails.
I'm trying to integrate a block of meta tags (along with one title tag) into the header of each one of my pages.
The tags & title for every page are different.
Based on the ERB template mechanism that's already running on this site, the path:
contains ERB's of all my html files: index.html.erb, about.html.erb, contact.html.erb
, I find a file named application.html.erb
containing the following:
<%= yield :extra_header_tags %>
<%= stylesheet_link_tag 'jquery.lightbox-0.5' %>
<%= stylesheet_link_tag 'style.css' %>
<%= yield :stylesheets %>
<%= yield %>
What is this <%= yield :extra_header_tags %>?
And how do I integrate my meta's in such a way that they're different for every page?
I guess I'm supposed to define some variables and then point them to someplace but I'm not sure how, any help would be very welcome.
(sorry for being such a n00b)