# 2 models -\> 1 model and class with array

**URL:** <https://www.ruby-forum.com/t/2-models-1-model-and-class-with-array/115765>\
**Category:** Rails\
**Created:** [September 28, 2007, 10:46am UTC](https://www.ruby-forum.com/t/2-models-1-model-and-class-with-array/115765 "2007-09-28T10:46:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demoversion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Post date:** [September 28, 2007, 10:46am UTC](https://www.ruby-forum.com/t/2-models-1-model-and-class-with-array/115765/1 "2007-09-28T10:46:13Z")

</div>

Hello,

I need a solution for my question - i have 2 models, for example  
person and city. model city will have 3 records every time(for example  
London, Berlin, Madrid). Actually i used belongs\_to, has\_many between  
this models and it’s fine, but all the times it run’s SQL to gel list  
of cities. I want to use only one model person and create some class  
that will contain this 3 records and when i will create a new person i  
can choose from select box a city.

Thanks
