Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ruby-1.9.2-p290 :001 > p = Product.find(6)
- Product Load (0.3ms) SELECT `products`.* FROM `products` WHERE `products`.`id` = 6 LIMIT 1
- => #<Product id: 6, name: "sdfsdf", price: 12, created_at: "2012-03-01 13:43:53", updated_at: "2012-03-01 13:43:53">
- ruby-1.9.2-p290 :002 > p.update_attributes(:name => "Teste de nome mudado");
- ruby-1.9.2-p290 :003 > exit
- (0.2ms) BEGIN
- 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)
- (18.6ms) COMMIT
Add Comment
Please, Sign In to add comment