title: how to set default value of form_for select
body: <p>I would like to know how to set default value on form_for select. </p>
  
  <p>My code goes like this:</p>
  
  <pre><code>&lt;%= form_for(@user) do |f| %&gt;
   .
   .
   .
  
   &lt;div class="field"&gt;
   &lt;%= f.select(:user_group_id, options_for_select(@user_groups.collect {|p| [ p.name, p.id ] },   "Select Category")) %&gt;
   &lt;/div&gt;
  &lt;%= end %&gt;
  </code></pre>
  
  <p>Obviously it would return all the values of the field user_group. On my edit page, I would like to set the default value to whatever value the user have in the user_group. Pls help</p>