Sha256: 6b821e4309fc641d7f726422f6ab8451e59a94baf9aa46d585645995b3e62c9c

Contents?: true

Size: 762 Bytes

Versions: 62

Compression:

Stored size: 762 Bytes

Contents

module ActionView
  module Helpers
    module NumberHelper
      def number_to_currency_with_workarea(number, options = {})
        if options[:unit].present? || options[:locale].present?
          return number_to_currency_without_workarea(number, options)
        end

        options = options.deep_dup
        options[:unit] = if number.is_a?(Money)
                           number.currency.symbol
                         else
                           Money.default_currency.symbol
                         end

        number_to_currency_without_workarea(number, options)
      end

      alias_method :number_to_currency_without_workarea, :number_to_currency
      alias_method :number_to_currency, :number_to_currency_with_workarea
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.26 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.45 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.25 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.23 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.44 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.22 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.43 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.21 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.42 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.20 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.41 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.19 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.40 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.18 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.39 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.17 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.38 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.16 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.37 lib/workarea/ext/freedom_patches/action_view_number_helper.rb