Created
February 5, 2009 22:20
-
-
Save fdutey/59056 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
#Questions mark (points d'interrogation) | |
Foo.all(:conditions => ['foo = ? AND bar = ?', foo, bar]) | |
#Hash and keys (méthode alternative, un hash et des clefs) | |
Foo.all(:conditions => ['foo = :foo AND bar = :bar', params]) | |
#params => { :foo => 'bar', :bar => 'foo', ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment