title: Multiple Checkboxes, Convert to String, Single DB Column Rails
body: <p>I have a form, that among other things, contains about 20 different checkboxes. Like so:</p>
  
  <pre><code>&lt;%= form_for @inventory do |f| %&gt;
  
  &lt;p&gt;
    &lt;%= f.label :name %&gt;&lt;br /&gt;
    &lt;%= f.text_field :name %&gt;
  &lt;/p&gt;
  
  ...
  
  &lt;p&gt;
    &lt;%= f.check_box :apple %&gt;&lt;%= f.label :apple %&gt;&lt;br /&gt;
    &lt;%= f.check_box :banana %&gt;&lt;%= f.label :banana %&gt;&lt;br /&gt;
    &lt;%= f.check_box :orange %&gt;&lt;%= f.label :orange %&gt;
    ...
  &lt;/p&gt;
  
  ...
  &lt;% end %&gt;
  </code></pre>
  
  <p>What I want to do is take the value of the selected checkbox, comma delimit them, and save them in a column in the db.  So if the apple and orange checkbox is checked it saves as:</p>
  
  <p>@inventory.fruit = "apple, orange"</p>
  
  <p>how do I do this?</p>