how to take spesific colums from database

I create 2 select list box in my index file ,brand and model now when user choose samsung from brand I want to list samsung phones in model list box should I create a def in controller or some thing else and if yes what kind of code should I write

best regards

I guess that you are a beginner with Rails and suggest that you work right through a good tutorial such as railstutorial.org, which is free to use online. That will show you the basics of rails. Also look at the Rails Guides.

Then you will be able to answer basic questions for yourself.

Colin