title: Rails pass array to partial using collection
body: <p>I'm trying to iterate through a regular array (not ActiveRecord), and render a partial using each element.</p>
  
  <p>In my view (I'm using slim):</p>
  
  <pre><code>== render partial: "layouts/display_elements", collection: my_array
  </code></pre>
  
  <p>My partial (for now) only contains:</p>
  
  <pre><code>= "#{display_element}"
  </code></pre>
  
  <p>However, I'm getting the following error:</p>
  
  <pre><code>undefined local variable or method `display_element' for #&lt;#&lt;Class:0x007f7fe2e6ca58&gt;:0x007f7fe51e0408&gt;
  </code></pre>
  
  <p>Is this a limit of imposed by not using ActiveRecord? Do I have to resort to</p>
  
  <pre><code>= my_array.each do |e|
  </code></pre>