instance method
id
Ruby on Rails edge
Since v3.2.22.5Signature
id()
Returns the primary key column’s value. If the primary key is composite, returns an array of the primary key column values.
Source
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 22
def id
_read_attribute(@primary_key)
end
Defined in activerecord/lib/active_record/attribute_methods/primary_key.rb line 22
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::PrimaryKey