Sounds like you want polymorphic associations.

Check out this previous thread:
http://groups.google.com/group/datamapper/browse_thread/thread/5a038e7065082acd/e19e2adf65ed80c2
In that discussion someone mentions the following solution:
http://pastie.org/214893

Or maybe check out hassox's dm-polymorphic:
http://github.com/hassox/dm-polymorphic/tree/master

On Sep 30, 7:39 am, Kless <[EMAIL PROTECTED]> wrote:
> On 29 sep, 21:44, myobie <[EMAIL PROTECTED]> wrote:> You could use STI to 
> make Person and Group the same table.
>
> That's impossible since that they are in separated tables (in my
> case):
>
> class Person
>    has n, :groups, :through => Resource
> end
>
> class Group
>    has n, :individuals, :through => Resource
> end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to