search for: get_old

Displaying 1 result from an estimated 1 matches for "get_old".

2006 Feb 28
0
Rolled my own alternative to trigger function with OLD/NEW
...k with PostgreSQL, I just inspected OLD and NEW in trigger functions. I came up with this alternative in Rails: class Item < ActiveRecord::Base def active=(value) self.set_old(''active'', self.active) write_attribute(:active, value) end def after_update if !get_old(''active'') and self.active Notifier::deliver_item_approved(self) end if get_old(''active'') != self.active Maintenance.delete_cache(''...'') # I wrote my own alternative to expire_fragment that actually works in models. Grumble....