Created
February 8, 2013 19:55
-
-
Save regedarek/4741515 to your computer and use it in GitHub Desktop.
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
| >> Job.where("application_date = ?", Job.last.application_date) | |
| Job Load (0.2ms) SELECT "jobs".* FROM "jobs" ORDER BY created_at ASC LIMIT 1 | |
| Job Load (0.2ms) SELECT "jobs".* FROM "jobs" WHERE (application_date = '2013-02-13') ORDER BY created_at DESC | |
| => [] |
Author
regedarek
commented
Feb 8, 2013
Author
>> Job.where(application_date: (Date.today + 5.days).strftime)
Job Load (0.1ms) SELECT "jobs".* FROM "jobs" WHERE "jobs"."application_date" = '2013-02-13' ORDER BY created_at DESC
=> []
>> Job.last.application_date
Job Load (0.7ms) SELECT "jobs".* FROM "jobs" ORDER BY created_at ASC LIMIT 1
=> Wed, 13 Feb 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment