Module: EffectiveFormInputsHelper

Defined in:
app/helpers/effective_form_inputs_helper.rb

Instance Method Summary collapse

Instance Method Details

#price_to_currency(price) ⇒ Object



2
3
4
5
6
# File 'app/helpers/effective_form_inputs_helper.rb', line 2

def price_to_currency(price)
  price = price || 0
  raise 'price_to_currency expects an Integer representing the number of cents' unless price.kind_of?(Integer)
  number_to_currency(price / 100.0)
end