I am trying to create active record schema that includes self
referential many to many.

Example.

I have models Group and Person. Person can belong to multiple groups and
that isn't the problem here. Problem is that I want groups to be able to
have both groups as well as people as members. And groups can be
subgroups in several parent groups at the same time (so if I understood
correctly ActsAsTree won't work in this situation)

I tried to do it with has_many, :through as well as with :polymorphic.
But wasn't succesfull. So my question is that is this at all possible or
should I look for workaround to this problem?

Code can be found from pastebin: http://pastebin.com/f1fc609d3

All suggestions appreciated.
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to