module ActiveRecord::AttributeMethods::PrimaryKey

def id

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