Displaying 1 result from an estimated 1 matches for "to_relations".
Did you mean:
correlations
2006 Mar 12
0
NameError when trying to combine Recipe 14 (rich HABTM) & Rec. 10 (self-ref HABTM):
...rson (attr: name)
Relation (attr: source_id, target_id)
(more details below)
ex: John ''works for'' Bob
1> jsmith = Person.create(:name => ''John Smith'')
2> jdoe = Person.create(:name => ''John Doe'')
3> jsmith.to_relations.create(:name => "works_for", :target => jdoe)
4> assert_equal 1, jsmith.slaves.size
>>>>
NameError: activesupport/lib/active_support/dependencies.rb:106:in
`const_missing'': uninitialized constant Slafe
Models
------------------------------------...