try:
class Person < ActiveRecord::Base
has_many :vassalships,:class_name=>'Vassalship',:foreign_key=>'master_id'
has_many :vassalship_belongings, :class_name =>
'Vassalship', :foreign_key => 'slave_id'
has_one :master,:through=>:vassalships,:source=>:person
has_many :servants
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 h
On Mon, Jan 5, 2009 at 6:14 PM, itsastickup wrote:
> My models look like this :
>
> class Person < ActiveRecord::Base
>
> has_many :vassalships,:class_name=>'Vassalship',:foreign_key=>:master_id
>has_one :master,:through=>:vassalships,:source=>:master;
>has_many :servants,:through
3 matches
Mail list logo