Forum: Ruby on Rails Dirty objects and overload attribute read/write methods

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bob B. (Guest)
on 2009-05-01 03:50
(Received via mailing list)

I'm trying to use dirty fields but keep running into trouble with
attributes that I've overloaded.  It looks like the dirty.rb module
uses read_attribute and to figure out the old value.  Unfortunately
this is before my overloaded methods have done their work.  Therefore,
the "old" value is not yet transformed and, hence, incorrect.  I've
pasted a little example here:

Can anyone help me with a solution?

This topic is locked and can not be replied to.