Forum: Ruby on Rails how rails insert object id to database?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zhenning G. (Guest)
on 2009-01-07 18:30
User Create (0.5ms)   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')
[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
  SQL (45.3ms)   COMMIT
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"}
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0
  User Columns (0.9ms)   SHOW FIELDS FROM `users`
  User Load (0.3ms)   SELECT * FROM `users` WHERE
(`users`.`id` = 34) 
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) 
==

Oops. How and when rails insert object id to database?
This topic is locked and can not be replied to.