title: Ruby on Rails HTML-Table Generator
body: <p>I am looking for a good RoR table generator (or an easy solution) that can give me a decent view of my records in a table (unstylized but proper strict XHTML).  </p>
  
  <p>Let's say I have a User model and an Address model:
  - A User can have many Addresses
  - One address is also linked as the "primary_address"</p>
  
  <p>Let's say I have the following in my User controller</p>
  
  <pre><code>def index
     @users = User.find(:all,:order =&gt; 'id ASC')
     @headers = ["id","First","Last","City","State"]
     @fields = [:id,:firstname,:lastname,:primary_address.city,:primary_address.state]
  end
  </code></pre>
  
  <p>I don't know if the array of fields would work but I think it gets the point across.  Does anyone know a good gem, plugin or technique for this so that I don't have to "repeat myself" on all my table views?</p>