How rails insert object id to database?

e[4;35;1mUser Create (0.5ms)e[0m e[0mINSERT INTO users (name,
avatar_file_name, avatar_file_size, created_at, updated_at,
avatar_content_type) VALUES(‘hello’, ‘Screenshot.png’, 253800,
‘2009-01-08 08:27:19’, ‘2009-01-08 08:27:19’, ‘image/png’)e[0m
[paperclip] Saving attachments.
[paperclip] Saving files for avatar
[paperclip] Deleting files for avatar
[paperclip] Writing files for avatar
[paperclip] ->
/home/ning/pa/public/system/avatars/34/medium/Screenshot.png
[paperclip] ->
/home/ning/pa/public/system/avatars/34/original/Screenshot.png
[paperclip] ->
/home/ning/pa/public/system/avatars/34/thumb/Screenshot.png
e[4;36;1mSQL (45.3ms)e[0m e[0;1mCOMMITe[0m
Redirected to /users/34
Completed in 1500ms (DB: 47) | 302 Found [http://127.0.0.1/users]

Processing UsersController#show (for 127.0.0.1 at 2009-01-08 00:27:19)
[GET]
Parameters: {“id”=>“34”}
e[4;35;1mSQL (0.1ms)e[0m e[0mSET NAMES 'utf8’e[0m
e[4;36;1mSQL (0.1ms)e[0m e[0;1mSET SQL_AUTO_IS_NULL=0e[0m
e[4;35;1mUser Columns (0.9ms)e[0m e[0mSHOW FIELDS FROM userse[0m
e[4;36;1mUser Load (0.3ms)e[0m e[0;1mSELECT * FROM users WHERE
(users.id = 34) e[0m
Rendering users/show

===
as all of you can see

INSERT INTO users (name, avatar_file_name, avatar_file_size,
created_at, updated_at, avatar_content_type) VALUES(‘hello’,
‘Screenshot.png’, 253800, ‘2009-01-08 08:27:19’, ‘2009-01-08 08:27:19’,
‘image/png’)

it doesn’t create a id 34, but move on , We see

SELECT * FROM users WHERE (users.id = 34) e[0m

Oops. How and when rails insert object id to database?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs