I'm trying to track down whether or not a problem I'm having is specific
to the JRuby platform, or it's an inherent limitation of AR. What I'm
trying to do is something like:
cash += tx.gain
where tx is another AR object and gain is a calculated field which isn't
persistent. My unit tests keep telling me that I'm trying to call nil.+
at this line, despite cash having been explicitly set. Curiously, the
problem occurs exactly the same when the code is:
cash = cash + tx.gain
The following work:
blah = cash + tx.gain
cash = blah
and
self[:cash] = cash + tx.gain
So anyone have a clue what's going on here? Is this just a quirk of AR
that I've been lucky enough not to have run into until now, or mightn't
this be something JRuby related?
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk