[4;35;1mUser Create (0.5ms) [0m [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'') [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 [4;36;1mSQL (45.3ms) [0m [0;1mCOMMIT [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"} [4;35;1mSQL (0.1ms) [0m [0mSET NAMES ''utf8'' [0m [4;36;1mSQL (0.1ms) [0m [0;1mSET SQL_AUTO_IS_NULL=0 [0m [4;35;1mUser Columns (0.9ms) [0m [0mSHOW FIELDS FROM `users` [0m [4;36;1mUser Load (0.3ms) [0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 34) [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) [0m = Oops. How and when rails insert object id to database? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---