module ActiveModel::Dirty

def attribute_will_change!(attr)

Handles *_will_change! for +method_missing+.
def attribute_will_change!(attr)
  return if attribute_changed?(attr)
  begin
    value = __send__(attr)
    value = value.duplicable? ? value.clone : value
  rescue TypeError, NoMethodError
  end
  set_attribute_was(attr, value)
end