class Typero::CurrencyType

Public Instance Methods

db_schema() click to toggle source
# File lib/typero/type/types/currency_type.rb, line 13
def db_schema
  [:decimal, {
    precision: 8,
    scale:     2
  }]
end
set() click to toggle source
# File lib/typero/type/types/currency_type.rb, line 9
def set
  value { |data| data.to_f.round(2) }
end