In my rails app, I have a few resources whose header needs differ from
the rest of the resources - they need extra javascript libraries, or
different css stylesheets, or link to an RSS feed to which I’d also like
to link in the html header. All pages share a standard layout template,
of course. I’m wondering what the best practice is for adding extra
stuff to the html header for individual pages. Currently, I populate
@extra_javascripts and @extra_stylesheets variables in the page
templates that require extra love, and check for the existence of those
variables in the master layout and add the links as necessary. I could
do this again for my rss feed, but this strikes me as a bit smelly. Has
anyone tackled a better approach to this?
- donald