Skip to content

Instantly share code, notes, and snippets.

@lukeledet
Created May 16, 2011 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukeledet/974834 to your computer and use it in GitHub Desktop.
Save lukeledet/974834 to your computer and use it in GitHub Desktop.
>> Visitor.find_or_create_by_date(:date => Time.now.to_date)
Visitor Load (0.5ms) SELECT "visitors".* FROM "visitors" WHERE "visitors"."date" = '2011-05-16' LIMIT 1
>> Client.first.visitors.find_or_create_by_date(:date => Time.now.to_date)
ArgumentError: Unknown key(s): date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment