Created
October 27, 2017 02:35
-
-
Save Awlter/6c6234a63d4a29c05f1b634c1122fde5 to your computer and use it in GitHub Desktop.
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
$ bin/rspec spec/models/user_spec.rb:11 | |
Running via Spring preloader in process 2911 | |
Run options: include {:locations=>{"./spec/models/user_spec.rb"=>[11]}} | |
User | |
From: /Users/wangxuefei/Documents/rails/yelp_clone/lib/sluggable.rb @ line 10 Sluggable#to_slug: | |
9: def to_slug | |
=> 10: binding.pry | |
11: slug = self.send(self.class.slug_column).gsub(/[^a-zA-Z0-9]/, '-').downcase | |
12: slug.gsub(/[-]+/, '-') | |
13: end | |
[1] pry(#<User>)> self | |
=> #<User:0x007ff9ba315fe0 | |
id: nil, | |
email: nil, | |
password_digest: "$2a$04$FAGqql2zeDFXwuG31yWEueGW7Ct8nhcuBewkYrhRQDQQvQEOI3Loy", | |
first_name: nil, | |
last_name: nil, | |
created_at: nil, | |
updated_at: nil, | |
slug: nil> | |
[2] pry(#<User>)> self.first_name = 'school' | |
=> "school" | |
[3] pry(#<User>)> self.last_name = 'launch' | |
=> "launch" | |
[4] pry(#<User>)> quit | |
From: /Users/wangxuefei/Documents/rails/yelp_clone/lib/sluggable.rb @ line 10 Sluggable#to_slug: | |
9: def to_slug | |
=> 10: binding.pry | |
11: slug = self.send(self.class.slug_column).gsub(/[^a-zA-Z0-9]/, '-').downcase | |
12: slug.gsub(/[-]+/, '-') | |
13: end | |
[1] pry(#<User>)> self | |
=> #<User:0x007ff9ba315fe0 | |
id: 1, | |
email: "an arbitrary value", | |
password_digest: "$2a$04$FAGqql2zeDFXwuG31yWEueGW7Ct8nhcuBewkYrhRQDQQvQEOI3Loy", | |
first_name: "school", | |
last_name: "launch", | |
created_at: Fri, 27 Oct 2017 02:27:16 UTC +00:00, | |
updated_at: Fri, 27 Oct 2017 02:27:16 UTC +00:00, | |
slug: "school-launch"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment