Skip to content

Instantly share code, notes, and snippets.

@mattetti
Forked from mattallen/gist:1300221
Created October 20, 2011 01:57
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 mattetti/1300226 to your computer and use it in GitHub Desktop.
Save mattetti/1300226 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p290 :009 > r = Record.where(:e => "x")
Record Load (42.8ms) SELECT "records".* FROM "records" WHERE "records"."e" = 'x'
=> []
ruby-1.9.2-p290 :010 > r.class
=> ActiveRecord::Relation
ruby-1.9.2-p290 :011 > r.where(:c => "y")
Record Load (41.3ms) SELECT "records".* FROM "records" WHERE "records"."e" = 'x' AND "records"."c" = 'y'
=> []
ruby-1.9.2-p290 :012 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment