title: How do you pass an array to an erb template in ruby and have it iterated over?
body: <p>I need some help with erb templates, I can't seem to get my head around passing an array and then iterating over it. 
  My problem is this. 
  I want to pass a few arrays:
  `</p>
  
  <pre><code>device      =&gt; ["eth0", "br0"],
  ipaddr      =&gt; ["192.168.12.166", "192.168.12.199"],
  netmask     =&gt; ["255.255.255.0", "255.255.255.0"], 
  hwaddr      =&gt; '',
  network     =&gt; '',
  gateway     =&gt; ["192.168.12.254", "192.168.12.204"],                                                                                                                
  </code></pre>
  
  <p>To a template that iterates over each item in the array and prints it out:</p>
  
  <pre><code>auto &lt;%= device %&gt; inet static                                                                                                                                        
  address &lt;%= ipaddr %&gt;
  netmask &lt;%= netmask %&gt;
  broadcast &lt;%= broadcast %&gt;
  gateway &lt;%= gateway %&gt;
  </code></pre>
  
  <p>As far as I can get so far is figuring out that I need to do something with <code>device.each |device| puts device</code>, but I don't know what the syntax is supposed to look like.
  I believe you can tell what I'm trying to do from these snippets, and then you might understand that the entries need to be seperate, and not interpolated. 
  Any help you can offer would be appreciated. I know I should be trying things out in irb and figuring them out from there, which is what I'm reading up on now. </p>
  
  <p>Thanks!</p>