Guest User

Untitled

a guest
Oct 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. [5] pry(#<Post>):1> nesting
  2. Nesting status:
  3. --
  4. 0. main (Pry top level)
  5. 1. #<Post>
  6. [6] pry(#<Post>):1> self.to_s
  7. => "#<Post:0x007feb8d37ab60>"
  8. [7] pry(#<Post>):1> self.title = 'some new title'
  9. => "some new title"
  10. [8] pry(#<Post>):1> self.body = 'some new body'
  11. => "some new body"
  12. [9] 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. [10] pry(#<Post>):1> self.save!
  15. (0.1ms) begin transaction
  16. SQL (0.8ms) UPDATE "posts" SET "title" = ?, "body" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["title", "some new title"], ["body", "some new body"], ["updated_at", "2017-10-17 01:49:07.005470"], ["id", 1]]
  17. (0.6ms) commit transaction
  18. => true
  19. [11] pry(#<Post>):1>
Add Comment
Please, Sign In to add comment