Dear Ilan,
although I just supplied just three basic models, my application already
contains more than 15 different models that should be linked to each
other.
Some more examples:
- I need a relationship between two documents ("Like: Document B is an
attachment to Document A).
- I need a relationship beween a Key-Class (the ones you use to open a
house ;) and a RealtyItem (name: "Key House-Entrance").
- I need a relationship between two Persons, to model something like
"Assistent"
I could supply a dozen more. This is why already now I want a flexible
modelling of these relationships.
I image a table to store the relationships like this:
id name the_one_id the_one_class the_other_id the_other_class
1 Owner 2 Person 3 RealtyItem
2 Assistant 5 Person 5 Person
3 Lease#333 5 Document 3 RealtyItem
It seems so simple - but how do I achieve it correctly using Rails?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---