title: send params with a =render :partial in rails
body: <p>in my view, I use content_for to load a partial (a javascript file). I'd like to pass a rails variable into the js file. Is there a way to do this?</p>
  
  <p>Right now, I have this in the view:</p>
  
  <pre><code>-content_for (:scroller) do
   =render :partial =&gt; '/images/public/scrollerJs'
  </code></pre>
  
  <p>What I want is something like this:</p>
  
  <pre><code>-content_for (:scroller) do
   =render :partial =&gt; '/images/public/scrollerJs', :params =&gt; #{@images}
  </code></pre>
  
  <p>My js file _scrollerJs.erb begins like this</p>
  
  <pre><code>var ScrollerObject = Class.create();
   Object.extend(ScrollerObject.prototype, {
   initialize: function() { ... }
    ...
  </code></pre>
  
  <p>Where would I pick up the param? I hope this makes sense. Thanks!</p>