easy before_update question (i hope)

in a before_update is there an easy way to check if a specific field is being changed?

for example

def before_update   unless current.email == new.email     # do stuff   end end

obviously "current.email" and "new.email" are wrong. i am guessing one will be "self.email", what would the other be?

in a before_update is there an easy way to check if a specific field is being changed?

for example

def before_update unless current.email == new.email    # do stuff end end

obviously "current.email" and "new.email" are wrong. i am guessing one will be "self.email", what would the other be?

from 2.1 onwards you'll get an email_changed? method for free.

Fred