Module: ActionView::Helpers::NumberHelper
- Defined in:
- lib/workarea/ext/freedom_patches/action_view_number_helper.rb
Instance Method Summary collapse
- #number_to_currency_with_workarea(number, options = {}) ⇒ Object (also: #number_to_currency)
Instance Method Details
#number_to_currency_with_workarea(number, options = {}) ⇒ Object Also known as: number_to_currency
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/workarea/ext/freedom_patches/action_view_number_helper.rb', line 4 def number_to_currency_with_workarea(number, = {}) if [:unit].present? || [:locale].present? return number_to_currency_without_workarea(number, ) end = .deep_dup [:unit] = if number.is_a?(Money) number.currency.symbol else Money.default_currency.symbol end number_to_currency_without_workarea(number, ) end |