title: Trouble with locals and partials with Rails
body: <p>I have the following in my js.erb file:</p>
  
  <pre><code>$('#menu').after($("&lt;%=escape_javascript(render 'boards/customize', :board =&gt; @board, :templates =&gt; @templates, :types =&gt; @types)%&gt;") 
  </code></pre>
  
  <p>So I try to pass some locals to my partial</p>
  
  <p>In my _customize.html.erb</p>
  
  <pre><code>&lt;div id="customize"&gt;
            &lt;ul id="categories"&gt;
              &lt;% @types.each do |type|%&gt;
              &lt;li&gt;&lt;%=link_to type.name, change_type_board_path(board, :type_id =&gt; type.id), :remote =&gt;  true %&gt;&lt;/li&gt;
              &lt;% end %&gt;
          &lt;/ul&gt;
          &lt;div id='carousel'&gt;
              &lt;%=render 'boards/carousel', :templates =&gt; templates %&gt;
          &lt;/div&gt;
      &lt;/div&gt; 
  
  I get the following error:
  </code></pre>
  
  <p><code>undefined local variable or method</code>board' for #&lt;#:0x00000103893e48`></p>
  
  <p>How are you supposed to pass in these variables to partials in Rails?</p>