No multiplier option for Field::Number.
Created by: tristandunn
The customizing dashboards documentation mentions using a multiplier
to display a currency value stored in cents. As far as I can tell that's not actually possible.
I'm guessing it should be something close to the code below. Unsure if it should attempt any casting or type checking though.
module Administrate
module Field
class Number < Field::Base
def to_s
if data.nil?
"-"
else
format_string % value
end
end
protected
def value
data * options.fetch(:multiplier, 1)
end
end
end
end