title: Including inline javascript using content_for in rails
body: <p>I am using content_for and yeild to inject javascript files into the bottom of my layout but am wondering what the best practice is for including inline javascript.  Specifically I'm wondering where the put the script type declaration:</p>
  
  <pre><code>&lt;% content_for :javascript do %&gt; 
    &lt;script type="text/javascript"&gt; ... &lt;/script&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;% content_for :javascript do %&gt; ... &lt;% end %&gt;
    &lt;script type="text/javascript"&gt;
      &lt;%= yield :javascript %&gt;
    &lt;/script&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I am using the first option now and wondering if it is bad to include multiple </p>
  
   ... 
  
  <p>declarations within one view.  Sometimes I have partials that lead to this.</p>