method

set_primary_key

Importance_1
v3.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods
set_primary_key(value = nil, &block) public

Sets the name of the primary key column to use to the given value, or (if the value is nil or false) to the value returned by the given block.

class Project < ActiveRecord::Base
  set_primary_key "sysid"
end
Show source
Register or log in to add new notes.