Forum: Ruby on Rails Rails 2.3.2 nested forms, option_groups etc

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John S. (Guest)
on 2009-03-26 18:10
Working in 2.3.2 and working from the examples in Github for nested
forms, this works fine for simple text fields, or simple selects but
option_groups_from_collection_for_select is a bit more complicated.

The js code he's used generates a template to be used for each nested
form, but it does it in the simple example by using a helper.
This will generate the correct html for the new record. But if you're
doing something a bit more complex e.g. using
option_groups_from_collection_for_select then you have to wrap the
options in your own select tag. So how do I get everything in place in
my hand coded <select> and also allow the js to create the right

All comments welcome


John S.
This topic is locked and can not be replied to.