Created
June 22, 2011 21:08
-
-
Save waynehoover/1041208 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
irb(main):004:0> Teacher.find_by_id(49) | |
Teacher Load (0.3ms) SELECT "teachers".* FROM "teachers" WHERE "teachers"."id" = 49 LIMIT 1 | |
=> #<Teacher id: 49, name: "Sam Rice", bio: nil, email: nil, created_at: "2011-06-22 21:03:41", updated_at: "2011-06-22 21:03:41", pic_file_name: nil, pic_content_type: nil, pic_file_size: nil, pic_updated_at: nil> | |
irb(main):007:0> Teacher.find_by_name("Sam Rice") | |
Teacher Load (0.3ms) SELECT "teachers".* FROM "teachers" WHERE "teachers"."name" = 'Sam Rice' LIMIT 1 | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kind of... It was something to do with my DB import I was doing from a CSV file. I dropped the DB and cleaned up my import file CSV, and it started working. I can't remember what I did to the CSV file, I think it was something with the UTF-8 encoding...