Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created March 22, 2009 05:25
Show Gist options
  • Save johnbender/83083 to your computer and use it in GitHub Desktop.
Save johnbender/83083 to your computer and use it in GitHub Desktop.
#where :foo is a column of some table
ActiveRecord::Base.where{
:foo.is == "bar"
:foo.is > 1
:foo.is < 2
:foo.is >= 3
:foo.is <= 4
:foo.contains "bar"
:foo.between 10..20
:foo.from 10, 20
:foo.in 1,2,3,4,5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment