Reputation: 137
The title might not be so clear, and anyway it's better to just look at this:
My sequence of creating/destroying items A, B and C is:
id:1
id:2
id:3
I've already destroyed B, C should be counted as id:2
right?
Upvotes: 3
Views: 201
Reputation: 7127
The underlying database column for id
is set to autoincrement. The id is generated at the database level, not by ActiveRecord
. If you want to know more, read up on SQL sequences or autoincrement .
Upvotes: 6