Topic: best way to achieve this

I have a Model named Companies
So every Company belongs to Sector, Activity and Item
for example
- Sector: Industrial
- Activity: Extractive
- Item: Mining

Sector has many activities
Activity, belongs to Sector and has many Items
Items belongs to activity

and I need a form for Company so when you select a Sector, another select for activities related to that sector appears and then another list with items for that sector appears next. Do i need JS for this?

Re: best way to achieve this

Direct javascript isn't required.. You can do this with a series of select_tag's and remote functions that are triggered by the :onchange event.   RJS might come in handy as well as you replace divs that contain the updated drop down lists.

Play postseason fantasy sports at Fantasy Postseason - Written in RoR