Created
February 15, 2017 10:45
-
-
Save mftaff/910c42acd0d593f1c550ccfcdd483e1e to your computer and use it in GitHub Desktop.
copy of testing pry in terminal
This file contains 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
mftaff:~/workspace $ cd code/bloccit/ | |
mftaff:~/workspace/code/bloccit (checkpoint-16-assignment) $ rails c | |
Loading development environment (Rails 4.2.5) | |
[1] pry(main)> nesting | |
Nesting status: | |
-- | |
0. main (Pry top level) | |
[2] pry(main)> post = Post.first | |
Post Load (81.7ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT 1 | |
=> nil | |
[3] pry(main)> cd post | |
[4] pry(nil):1> nesting | |
Nesting status: | |
-- | |
0. main (Pry top level) | |
1. nil | |
[5] pry(nil):1> self.to_s | |
=> "" | |
[6] pry(nil):1> self.title = "ho" | |
NoMethodError: undefined method `title=' for nil:NilClass | |
from (pry):3:in `__pry__' | |
[7] pry(nil):1> self.changes | |
NoMethodError: undefined method `changes' for nil:NilClass | |
from (pry):4:in `__pry__' | |
[8] pry(nil):1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment