id()
Returns the primary key value.
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 17 def id return unless self.class.primary_key sync_with_transaction_state read_attribute(self.class.primary_key) end