Cool. Again, this is what I figured. If I go the two relationships in routes, what type of relationship is this... belongs_to?
So I would write something like the following: class Route belongs_to :start, :class_name => 'Location', :foreign_key => "start_location" belongs_to :end, :class_name => 'Location', :foreign_key => "end_location" ... ?? On Sep 29, 8:32 pm, "Rodrigo Fuentealba" <[EMAIL PROTECTED]> wrote: > 2008/9/29 Jason <[EMAIL PROTECTED]>: > > > I am new to rails, but very old in databases: > > If a route has two and will never have more than two nor less than > two, you have to create two relationships, one called begin and other > called end. Else, you have to create a table HABTM, where one route > describes the full stack of relationships (with some kind of > sorted-by). > > Regards, > > -- > Rodrigo Fuentealbahttp://www.thecodekeeper.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

