title: Using a duration field in a Rails model
body: <p>I'm looking for the best way to use a duration field in a Rails model.  I would like the format to be HH:MM:SS (ex: 01:30:23).  The database in use is sqlite locally and Postgres in production.  </p>
  
  <p>I would also like to work with this field so I can take a look at all of the objects in the field and come up with the total time of all objects in that model and end up with something like:</p>
  
  <blockquote>
    <p>30 records totaling 45 hours, 25 minutes, and 34 seconds.</p>
  </blockquote>
  
  <p>So what would work best for?</p>
  
  <ul>
  <li>Field type for the migration</li>
  <li>Form field for the CRUD forms (hour, minute, second drop downs?)</li>
  <li>Least expensive method to generate the total duration of all records in the model</li>
  </ul>