Skip to content

Instantly share code, notes, and snippets.

@maxhodak
Created June 20, 2011 01:07
Show Gist options
  • Save maxhodak/1034976 to your computer and use it in GitHub Desktop.
Save maxhodak/1034976 to your computer and use it in GitHub Desktop.
>> fd = User.new
=> #<User id: nil, created_at: nil, updated_at: nil>
>> fd.save
SQL (0.4ms) BEGIN
SQL (10.6ms) INSERT INTO `users` (`created_at`, `updated_at`) VALUES (?, ?) [["created_at", Mon, 20 Jun 2011 01:01:40 UTC +00:00], ["updated_at", Mon, 20 Jun 2011 01:01:40 UTC +00:00]]
(1.6ms) COMMIT
=> true
>> fd
=> #<User id: 0, created_at: "2011-06-20 01:01:40", updated_at: "2011-06-20 01:01:40">
>> User.find 1
User Load (2.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = ? LIMIT 1 [["id", 1]]
=> #<User id: 1, created_at: "2011-06-20 01:01:40", updated_at: "2011-06-20 01:01:40">
@maxhodak
Copy link
Author

This is on a dummy app with no modifications: just created and rails g scaffold User; rake db:migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment