[email protected] wrote
The primary key attribute is protected from mass assignment,
so can’t be set by passing its value in a hash. Try this instead:
i = Inc.new(“name” => “to inc or not to inc?”) i.id = 123 i.save
It works fine, thanks for your help!