I’ve read through countless blogs and the docs and can’t seem to get
what I expect. I also tried irc on freenode, but they ignored me. I
must have a case of the mange or something.
I have a Person model (on a people table) and I want a hierarchy of
masters and servants. I’m doing this via a Vassalship model. When I
try to assign a master to a servant like so :
I get NoMethodError: undefined method `update_attributes’ for #<Class:
And who knows what class that was. I can do
seniorperson.servants<<juniorperson no problem, but then I get a nil
for juniorperson.master ?!?!
My models look like this :
class Person < ActiveRecord::Base
class Vassalship < ActiveRecord::Base
I’m doing something wrong, but I don’t know what. And anyone got a
better idea for the relationship? Vassalship seems a bit obscure.