title: changing form behavior on submit based on radio button selection
body: <p>I'm using Rails 3.1.0.rc5. I want to have a form with a pair of radio buttons, <code>enable</code> and <code>disable</code>, and a field to enter an integer (<code>expire_after_days</code>, the number of days until ticket expiration), with a hidden field for the fixed parameter <code>subdomain_name</code>. I'd like to be able to use the same simple form to create, edit, or delete a record, depending on which radio button is checked.</p>
  
  <p>So if <code>enable</code> is checked, with no record found for the <code>subdomain_name</code>, a record would be created on form submission.</p>
  
  <p>If <code>enable</code> is checked, and a record is found, the existing record should be updated on form submission.</p>
  
  <p>And if <code>disable</code> is checked, the record should be deleted on form submission.</p>
  
  <p>Is this a reasonable thing to do? If so, what tips do you have for how to do it?</p>