Skip to content

Instantly share code, notes, and snippets.

@fdutey
Created February 5, 2009 22:20
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 fdutey/59056 to your computer and use it in GitHub Desktop.
Save fdutey/59056 to your computer and use it in GitHub Desktop.
#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