Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 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:0x00000004addd48>"
  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"],
  14. "body"=>["This is the first post in our system", "some new body"]}
  15. [10] pry(#<Post>):1> self.save!
  16. (0.1ms) begin transaction
  17. SQL (0.4ms) UPDATE "posts" SET "title" = ?, "body" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["title", "some new title"], ["body", "some new body"], ["updated_at", "2017-08-18 00:12:14.968479"], ["id", 1]]
  18. (8.4ms) commit transaction
  19. => true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement