# Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax

**URL:** <https://www.ruby-forum.com/t/building-a-cascading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/190293>\
**Category:** Rails\
**Created:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/building-a-cascading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/190293 "2010-06-17T16:22:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/41988e/32.png) [@Ian\_I](https://www.ruby-forum.com/u/Ian_I)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/building-a-cascading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/190293/1 "2010-06-17T16:22:42Z")

</div>

Cascading Drop Down Selection Lists are when the value of a second  
drop down are filtered based on the values a first field (usually a  
drop down, but could be a radio box, check box or even text)

Select a Country and then State or Province; or Select a Car  
Manufacture and then a Car Model.

This time of feature is has also been called Related Drop Down fields  
or Dependant Drop Down lists or Dynamic Drop Downs or Dependent Drop  
Downs.

I’ve posted code and discussion over at

> **[Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax](https://www.falsepositives.com/2010/05/28/building-a-casscading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/)**
>
> A frequent need in building web site application is to have users select one value and then, based on that value, select another value. Real world needs for related values might be : Select a Count…

The code is built and Tested with Ruby on Rails 2.3.5 and jQuery  
1.4.2

Hope you find this useful. feedback welcome.

Ian I.  
Toronto, Canada  
Code and Culture : [http://www.FalsePositives.com](http://www.FalsePositives.com)  
Building the People and Data Driven Web :  
[http://www.ConnectedThinking.com/](http://www.ConnectedThinking.com/)

---

<div class="post-metadata">

**Author:** ![Ian\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/41988e/32.png) [@Ian\_I](https://www.ruby-forum.com/u/Ian_I)\
**Post date:** [June 17, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/building-a-cascading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/190293/2 "2010-06-17T16:26:23Z")

</div>

Easiest would be to make the select a partial and update the partial  
based on the object sent to the query. You make an ajax call when an  
item is selected, query the db, replace the select you want to update  
with the partial with the items scoped for the parent object.
