Hello, I'm new to Ruby on Rails, and need some help.
I'm working on a web application which can be used to keep track of cars. There are two models, one which represents makes (Saab, Honda, Toyota, etc) and another which represents models (Civic, Miata, PT Cruiser, etc). They have a "has_many" relationship:
script/generate scaffold make name:string
script/generate scaffold model name:string make_id:integer
I created a view with two select boxes (created using the select helper method), one for makes and one for models.
Here's what I'm having trouble figuring out how to do: I would like for the second select box to be populated only with the models which correspond to the make selected in the first. When the make changes in the first select box, so should the models in the second.
Thanks guys!