On Sep 25, 2011, at 1:39 PM, Dani Dani wrote:

> Hi,
> how can I use checkbox in a form to show all customers from table
> customers,
> 
> Course      Users         Customers
> =========   =========     =============
> user_id     customer_id   Customer_name
> 
> I would like to select customers from the checkbox list, then add to the
> course table only users of the selected customers.

What does the relationship look like between Course and Customer? Is there an 
Enrollment object sitting between them? 

One way might be to have a form_for @course on your Customers#index page, and a 
submission of that to the CoursesController would build a new Enrollment for 
each submitted Customer on that Course.

Walter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to