Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. [12] pry(#<Post>):1> nesting
  2. Nesting status:
  3. --
  4. 0. main (Pry top level)
  5. 1. #<Post>
  6. [13] pry(#<Post>):1> self.to_s
  7. => "#<Post:0x007fffd13d3f28>"
  8. [14] pry(#<Post>):1> self.title = 'some new title'
  9. => "some new title"
  10. [15] pry(#<Post>):1> self.body = 'some new body'
  11. => "some new body"
  12. [16] pry(#<Post>):1> self.changes
  13. => {"title"=>["First Post", "some new title"], "body"=>["This is the first post in our system", "some new body"]}
  14. [17] pry(#<Post>):1> self.save!
  15. (0.1ms) begin transaction
  16. SQL (3.1ms) UPDATE "posts" SET "title" = ?, "body" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["title", "some new title"], ["body", "some new body"], ["updated_at", 2017-03-28 16:14:59 UTC], ["id", 1]]
  17. (33.8ms) commit transaction
  18. => true
  19. [18] pry(#<Post>):1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement