Say you need to add some JS optimization code that looks like this:
Just create a _google_opt_file1.html.erb file under app/views/shared and then call it in your view with
<%= render :partial => 'shared/google_opt_file1' if RAILS_ENV == 'production' %>
This kind of SEO script typically goes right before the </body> tag. And you only need this script to run on your production site, hence the if clause.