class method self.primary_key

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.primary_key()

Defines the primary key field – can be overridden in subclasses. Overwriting will negate any effect of the primary_key_prefix_type setting, though.

Source
# File activerecord/lib/active_record/base.rb, line 1188
      def primary_key
        reset_primary_key
      end

Defined in activerecord/lib/active_record/base.rb line 1188 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close