Flowdock
method

reset_primary_key

Importance_0
v1.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::Base
reset_primary_key() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/base.rb, line 614
      def reset_primary_key
        key = 'id'
        case primary_key_prefix_type
          when :table_name
            key = Inflector.foreign_key(class_name_of_active_record_descendant(self), false)
          when :table_name_with_underscore
            key = Inflector.foreign_key(class_name_of_active_record_descendant(self))
        end
        set_primary_key(key)
        key
      end
Register or log in to add new notes.