The typical way of doing this:
<p>Parent Company</p>
<%= f.collection_select :parent_company_id, ... %>
You go around to all the child company records and set their parent company. Afterwards, you take a look at @parent.subsidiaries
for your list.
If you want to do this all from the parent company's form, you'll have to do some trickery with javascript and fields_for
and accepts_nested_attributes_for
, or maybe with a bunch of checkboxes -- the record that is actually changed is the child record, not the parent record.
Watching this railscast may help.