Hi, I am new to Ruby on Rails and - of course - have a problem...
I have cities and I want to define neighborcities. I want to do this
via a second table (cities_cities), where the city_ids are going to be
connected. Now, if city 1 is a neighbor of city 2, then city 2 is a
neighbor of city 1, so to keep it consistent, I want to save it in the
database with the smaller city_id as city_id1, the higher id as
city_id2.
Then my city Model would get the definition
<pre>
has_and_belongs_to_many :neighborcities
:class_name => "City"
</pre>
<pre>
cities