Change checkbox to change in db in rails?
<p>I have a table "User" with "admin" is "true" or "false". I show it with checkbox_feild. How can i change db if i clicked in checkbox? Thanks all.</p>

<pre><code>&lt;% @users.each do |user| %&gt;
  &lt;%= form_for user, do |f| %&gt;
  &lt;div class="field"&gt;
    &lt;%= f.check_box :admin%&gt;
  &lt;/div&gt;
 &lt;% end %&gt;
&lt;% end %&gt;
</code></pre>