Class: Headmin::Filter::Money
- Defined in:
- app/models/headmin/filter/money.rb
Constant Summary
Constants inherited from Number
Constants inherited from Base
Base::OPERATORS, Base::OPERATORS_CONVERT_TO, Base::QUERY_OPERATOR_CONVERT_TO, Base::QUERY_VALUE_CONVERT_TO
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Number
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
#attribute ⇒ Object
8 9 10 |
# File 'app/models/headmin/filter/money.rb', line 8 def attribute "#{@attribute}_cents" end |
#cast_value(value) ⇒ Object
4 5 6 |
# File 'app/models/headmin/filter/money.rb', line 4 def cast_value(value) super(value) * 100 end |