Skip to content

Instantly share code, notes, and snippets.

@fdutey fdutey/gist:59056
Created Feb 5, 2009

Embed
What would you like to do?
#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
You can’t perform that action at this time.