title: How to convert array of ActiveRecord models to CSV?
body: <p>I got an array of ActiveRecord models that I wish to convert to a CSV. I tried researching gems like FasterCSV, but they just seem to work with strings and arrays, not ActiveRecord models.</p>
  
  <p>In short, I want to convert:</p>
  
  <pre><code>user1 = User.first
  user2 = User.last
  a = [user1, user2]
  </code></pre>
  
  <p><strong>TO:</strong></p>
  
  <pre><code>   id,username,bio,email
      1,user1,user 1 bio,user1 email
      1,user2,user 2 bio,user2 email
  </code></pre>
  
  <p>Is there an easy Rails way to do this?</p>