id()
Returns the primary key value.
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 18 def id sync_with_transaction_state primary_key = self.class.primary_key _read_attribute(primary_key) if primary_key end