Displaying 2 results from an estimated 2 matches for "loadtestdata".
2008 Sep 24
2
Calling object outside function
What i thought was a simple process isnt working for me. After i create an
multiple objects in a function (see below), how to i use those objects later
in the program. I tried calling the function again and then the object i
wanted and it worked the first time but now it doesnt( i think i defined the
object outside the function accidently so then it worked but when run
properly it doesnt). I
2007 May 17
8
Model: self is not child's parent
Assume a model Parent and another model Child. Child belongs_to Parent
and Parent has_many Children. The following fails:
@
p = Parent.find(:first)
assert p.equal?(p.children[0].parent)
@
It seems odd to me that I and my child''s parent are not the same object.
In fact, this is royally screwing me up. Can anyone tell me why this is
or point me at a relevant discussion, blog posting,