before_update/after_update debate

Hi Blake,

It seems as though there is no way to get the value of an attribute in
before_update, BEFORE the update occurs.

What exactly does before_update mean then? Is before_save called before
before_update? Are they different?

before_save is called before a save or an update, before_update is
only called before an update (e.g., #update_attributes).

I've tried querying the database like:

def before_update
  tran = Tran.find( self.id )
  oldName = tran.Name
end

But it never returns the old value of Name.

Hmm, seems to work for me.

Do you know if the hook is being run? If so, is it finding the old
record? What's the value of tran?

If not, how are you doing the update? Might a validation be failing
preventing the update?

Regards,
George.