I have a reservation class which has origin_city and destination_city,
both of which are instance of location class. How would I represent
this using belongs_to relationship. I would like something like:
class Location ...
has_one reservation for origin_city
has_one reservation for destination_city
belongs_to :location, :as => origin_city
belongs_to :location, :as => destination_city
Can someone correct the exact syntax for me.