Displaying 1 result from an estimated 1 matches for "endangered_tig".
2006 Apr 22
4
Slice and dice plugin
...mple equality conditions, other tests such as more than,
less than and contains can also be specified:
Animals.find :first, :conditions => {:name_starts_with => ''Tig''}
Animals.find :all, :conditions => {:population_more_than => 1_000_000}
Conditions can be combined:
endangered_tigers = Animals.find :all, :conditions => {:name_contains
=> ''Tiger'', :population_less_than => 10_000}
These conditions can also be used in calculations and scoped queries:
Animals.count :conditions => {:population_more_than => 1_000_000}
Animals.with_scope :find =&...