Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [5] pry(#<Post>):1> nesting
- Nesting status:
- --
- 0. main (Pry top level)
- 1. #<Post>
- [6] pry(#<Post>):1> self.to_s
- => "#<Post:0x007fa97d2e3528>"
- [7] pry(#<Post>):1> self.title = 'some new title'
- => "some new title"
- [8] pry(#<Post>):1> self.body = 'some new body'
- => "some new body"
- [9] pry(#<Post>):1> self.changes
- => {"title"=>["First Post", "some new title"],
- "body"=>["This is the first post in our system", "some new body"]}
- [10] pry(#<Post>):1> self.save!
- (0.1ms) begin transaction
- SQL (0.5ms) UPDATE "posts" SET "title" = ?, "body" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["title", "some new title"], ["body", "some new body"], ["updated_at", 2017-01-23 22:52:10 UTC], ["id", 1]]
- (0.5ms) commit transaction
- => true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement