Guest User

Untitled

a guest
Sep 14th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. ruby-1.9.2-p290 :001 > p = Product.find(6)
  2. Product Load (0.3ms) SELECT `products`.* FROM `products` WHERE `products`.`id` = 6 LIMIT 1
  3. => #<Product id: 6, name: "sdfsdf", price: 12, created_at: "2012-03-01 13:43:53", updated_at: "2012-03-01 13:43:53">
  4. ruby-1.9.2-p290 :002 > p.update_attributes(:name => "Teste de nome mudado");
  5. ruby-1.9.2-p290 :003 > exit
  6. (0.2ms) BEGIN
  7. SQL (0.5ms) INSERT INTO `versions` (`created_at`, `event`, `item_id`, `item_type`, `object`, `whodunnit`) VALUES ('2012-03-01 16:01:35', 'update', 6, 'Product', '---\nid: 6\nname: sdfsdf\nprice: 12\ncreated_at: 2012-03-01 13:43:53.000000000Z\nupdated_at: 2012-03-01 13:43:53.000000000Z\n', NULL)
  8. (18.6ms) COMMIT
Add Comment
Please, Sign In to add comment