Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created March 13, 2009 23:04
Show Gist options
  • Save johnbender/78815 to your computer and use it in GitHub Desktop.
Save johnbender/78815 to your computer and use it in GitHub Desktop.
Zoo.find(:all, :conditions => ['num_employees between ? and ?', 100 , 300])
Zoo.find(:all, :conditions => ['name = ?', 'Dallas'])
User.find(:first, :conditions => ['age between ? and ?', 10, 20])
Zoo.where do
:num_employees.is.between [100, 300]
end
Zoo.where do
:name.is == 'Dallas'
end
User.where do
:age.from {10 => 20}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment