I have a table "User" with "admin" is "true" or "false". I show it with checkbox_feild. How can i change db if i click in checkbox if i don't use ajax? Thanks all.
<% @users.each do |user| %>
<%= form_for user, do |f| %>
<div class="field">
<%= f.check_box :admin%>
</div>
<% end %>
<% end %>
Aucun commentaire:
Enregistrer un commentaire