Class: Headmin::Filter::Number
- Defined in:
- app/models/headmin/filter/number.rb
Direct Known Subclasses
Constant Summary collapse
- OPERATORS =
%w[eq not_eq gt gteq lt lteq between not_between in not_in is_null is_not_null]
Constants inherited from Base
Base::OPERATORS_CONVERT_TO, Base::QUERY_OPERATOR_CONVERT_TO, Base::QUERY_VALUE_CONVERT_TO
Instance Attribute Summary
Attributes inherited from Base
#attribute, #instructions, #raw_value
Instance Method Summary collapse
Methods inherited from Base
#build_query, #conditionals, #display_value, #initialize, #is_i?, #operators, #query, #string, #values
Constructor Details
This class inherits a constructor from Headmin::Filter::Base
Instance Method Details
#cast_value(value) ⇒ Object
6 7 8 |
# File 'app/models/headmin/filter/number.rb', line 6 def cast_value(value) is_i?(value) ? value.to_i : 0 end |
#to_s ⇒ Object
10 11 12 |
# File 'app/models/headmin/filter/number.rb', line 10 def to_s string end |