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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
22e5a5d0ff983a5eba6af7c7b81874c2?d=identicon&s=25 Bob B. (Guest)
on 2009-05-01 01:50
(Received via mailing list)
Hi,

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:

http://pastie.org/464578

Can anyone help me with a solution?

Thanks,
Bob
This topic is locked and can not be replied to.