module ActiveRecord::AttributeMethods::PrimaryKey
def attribute_method?(attr_name)
def attribute_method?(attr_name) attr_name == "id" || super end
def id
def id _read_attribute(@primary_key) end
def id=(value)
def id=(value) _write_attribute(@primary_key, value) end
def id?
def id? query_attribute(@primary_key) end
def id_before_type_cast
def id_before_type_cast attribute_before_type_cast(@primary_key) end
def id_for_database # :nodoc:
def id_for_database # :nodoc: @attributes[@primary_key].value_for_database end
def id_in_database
def id_in_database attribute_in_database(@primary_key) end
def id_was
def id_was attribute_was(@primary_key) end
def to_key
Returns this record's primary key value wrapped in an array if one is
def to_key key = id [key] if key end