title: Rails global content_for
body: <p>Example:</p>
  
  <p>I have 2 partial _map.haml and _bigmap.haml. </p>
  
  <p>:: _map.haml</p>
  
  <pre><code>- content_for :map do
    %script{:type =&gt; "text/javascript", :src =&gt; "http://maps.google.com/maps/api/js?sensor=true"}
    ...
  </code></pre>
  
  <p>:: _bigmap.haml</p>
  
  <pre><code>- content_for :bigmap do
    %script{:type =&gt; "text/javascript", :src =&gt; "http://maps.google.com/maps/api/js?sensor=true"}
    ...
  </code></pre>
  
  <p>In my layout I include javascripts into </p>
  
  <pre><code>= yield(:map)
  = yield(:bigmap)
  </code></pre>
  
  <p>QUESTION 1:
  This means google library will be included twice. How can I handle this so the library is always loaded only once? A was thinking of view heler maybe?</p>
  
  <p>QUESTION 2:
  Is it possible to have a global content_for field where each partial appends it's content to it?
  Thx.</p>