Collection_select has_many


i have two models:
GeoRegion & GeoRegionSub

which have a has_many relation to each other.

how can include the has_many relation in the collection_select helper? i
want to have that dropdown where the parent is in black and the children

<%= collection_select :dl,:parent_id, GeoRegion.all.???, :id, :title %>


Same here.
It’s such a pain to find the appropriate documentation to do that.

u can do that:

<%= select_tag :skillset_id,
:children, :title, :id, :title) %>

Skillset is a act_as_tree model!

hope that helps

Thank you.

You just made my day!

I tried your solution then find out this equivalent (better?)

Thanks for the help.

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