Edit: I have created a gem that makes it simple to set up cascading selects in Rails. Check it out here!
The following guide details how to get up and running with cascading selects to forms in Rails using jquery-dynamic-select.
Cascading selects allows you to select an option in one select field, and have it dynamically populate another field on the form based on your selection. For example, if you had a form for entering car information, the field Make would determine the values to be shown in Model. (e.g. Nissan → Altima, Maxima, etc.) Using this jQuery library will allow you to populate the second select field without having to reload the page.
The example implementation will implement a cascading select for a Terminal form. A Terminal belongs to a Serving Area, which itself belongs to an Exchange. In order to properly create a Terminal, we must