Has many relation in a form

Hi,
I have 2 models, group and user.
A group has many users and a user belongs to a group.

In my new group form, I want a checkox list with all my users and get
all the checked users.

How do I do this in the form?

<%= form_for(@group) do |f| %>

<%= f.label :name %>
<%= f.text_field :name %>
<% @users.each do |user| %>
    <%= f.label user.fullname %>
    ???
<% end %>


<% end %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs