module ActiveRecord::AttributeMethods::PrimaryKey

def id

Returns the primary key column's value.
def id
  _read_attribute(@primary_key)
end