I have a need for REST (as well as other things), as mentioned, and
for that I require the go-between model. In anycase presumably my
original question does have an answer, no? Perhaps :through does not
work self-referentially, although I would be surprised. But the docs
don;t have it and blogs haven't helped.

On 5 Jan, 22:45, "Franz Strebel" <[email protected]> wrote:
> On Mon, Jan 5, 2009 at 6:14 PM, itsastickup <[email protected]> wrote:

> You only need one model, Person should suffice:
>
> class Person < ActiveRecord::Base
>
>   belongs_to :master, :class_name => 'Person', :foreign_key => 'master_id'
>
>   has_many :servants, :class_name => 'Person', :foreign_key => 'master_id'
>
> end
>
> Let me know how you get on.
>
> Regards,
> Franz
--~--~---------~--~----~------------~-------~--~----~
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