title: How do ruby on rails multi parameter attributes *really* work (datetime_select)
body: <p>I believe that <code>datetime_select</code> is black magic.  What I'm really trying to figure out is the whole <code>1i</code>,<code>2i</code>,<code>3i</code>,<code>4i</code>... multiple parameters stuff.  Specifically how is it handled in the back end (activerecord, something else?).  What's with the 'i' after the order-number? Is it a type-specifier?  If so what are other types that are available? I've read the source of date_helper.rb and it's quite opaque.</p>
  
  <p>Here's my motivation:</p>
  
  <p>I've got a <code>:datetime</code> column in my model and I want to input in the view via two <code>text_field</code>s: one for date and one for time.  They need to be validated, merged together, then stored into the datetime column.  Ultimately I'll be using a javascript calendar to input dates into the date field. </p>
  
  <p>So has anybody done this? I tried using virtual attributes (incredibly undocumented besides the rudimentary railscast) and the issue was that when a new activerecord object is created and has nil attributes, the virtual attribute fails (undefined method <code>strftime</code> for nil class, which makes sense).</p>
  
  <p>Anybody have any suggestions or best practices? Thanks!</p>