Form - Tick boxes in related table

Sure this one is solved somewhere, but couldn’t find it.

I have a table which has a related table (has many through). I wish
to choose 1 or more items in the related table with a check box. For
example, if I had a table with group one, group two and group three
and a list of clients. I would like to have a form so that given a
client, (in the edit client form), I can assign a client to one or
more groups.

How would I construct a form to achieve this using a reasonable
succinct controller?

Many thanks,

Mike

On Tue, Apr 21, 2009 at 2:46 PM, mikej [email protected] wrote:

How would I construct a form to achieve this using a reasonable
succinct controller?

Many thanks,

Mike

Have a look at fields_for which you can use for linked models

There is also Nested Object Forms in Rails 2.3

Andrew T.
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

“I have never let my schooling interfere with my education” - Mark Twain