Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#price_with_currency(price = 0, precision = 2) ⇒ Object
3 4 5 6 |
# File 'app/helpers/application_helper.rb', line 3 def price_with_currency(price=0, precision=2) price = (price * current_currency.to_exchanges_rate(Currency::default).rate) unless current_currency.default? number_to_currency price, :precision => precision, :unit => current_currency.html end |