module ActiveRecord::AttributeMethods::PrimaryKey

def id=(value)

raises TypeError when the set value not enumerable.
Sets the primary key column's value. If the primary key is composite,
def id=(value)
  _write_attribute(@primary_key, value)
end