has_and_belongs_to_many :neigborcities

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

This sounds like what people have coded for networks of friends, i.e.
self-referential many to many, without the complication of inviting
people and having people be pending friends

http://railsforum.com/viewtopic.php?pid=8007
http://svn.dnite.org/has_many_friends/README