Rails 2.3.2 nested forms, option_groups etc

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 f.select 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 and also allow the js to create the right

All comments welcome


John S.

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