Class: Headmin::Filter::Money

Inherits:
Number show all
Defined in:
app/models/headmin/filter/money.rb

Constant Summary

Constants inherited from Number

Number::OPERATORS

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

#instructions, #raw_value

Instance Method Summary collapse

Methods inherited from Number

#to_s

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

#attributeObject



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