| Class | ActiveRecord::Extensions::Comparison |
| In: |
ar-extensions/lib/ar-extensions/extensions.rb
|
| Parent: | Object |
ActiveRecord::Extension to translate Hash keys which end in _lt, _lte, _gt, or _gte with the approriate <, <=, >, or >= symbols.
Model.find :all, :conditions=>{ 'number_gt'=>100 }
Model.find :all, :conditions=>{ 'number_lt'=>100 }
Model.find :all, :conditions=>{ 'number_gte'=>100 }
Model.find :all, :conditions=>{ 'number_lte'=>100 }
| SUFFIX_MAP | = | { 'eq'=>'=', 'lt'=>'<', 'lte'=>'<=', 'gt'=>'>', 'gte'=>'>=', 'ne'=>'!=', 'not'=>'!=' } |
| ACCEPTABLE_COMPARISONS | = | [ String, Numeric, Time, DateTime ] |