Created
April 12, 2018 18:19
-
-
Save GermanHoyos/275b0c72727b50022f0bc913b0b5fc24 to your computer and use it in GitHub Desktop.
bloccit-rails-console-assignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [14] pry(#<Post>):1> nesting | |
| Nesting status: | |
| -- | |
| 0. main (Pry top level) | |
| 1. #<Post> | |
| [15] pry(#<Post>):1> self.title = "my new title" | |
| => "my new title" | |
| [16] pry(#<Post>):1> self.body = "My new body" | |
| => "My new body" | |
| [17] pry(#<Post>):1> save! | |
| (0.0ms) begin transaction | |
| SQL (1.0ms) UPDATE "posts" SET "title" = ?, "body" = ?, "updated_at" = ? WHER | |
| E "posts"."id" = ? [["title", "my new title"], ["body", "My new body"], ["updat | |
| ed_at", "2018-04-12 18:16:03.944125"], ["id", 1]] | |
| (60.0ms) commit transaction | |
| => true | |
| [18] pry(#<Post>):1> self | |
| => #<Post:0x50471d0 | |
| id: 1, | |
| title: "my new title", | |
| body: "My new body", | |
| created_at: Thu, 12 Apr 2018 15:10:35 UTC +00:00, | |
| updated_at: Thu, 12 Apr 2018 18:16:03 UTC +00:00> | |
| [19] pry(#<Post>):1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment