module ActiveRecord::AttributeMethods::PrimaryKey

def id_was

returns an array of primary key column previous values.
Returns the primary key column's previous value. If the primary key is composite,
def id_was
  attribute_was(@primary_key)
end