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.4.27 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.4 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.26 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.3 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.25 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.2 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.24 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.1 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.23 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.22 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.0 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.21 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.5.0.beta.1 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.20 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.19 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.18 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.17 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.16 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.15 lib/workarea/ext/freedom_patches/action_view_number_helper.rb
workarea-core-3.4.14 lib/workarea/ext/freedom_patches/action_view_number_helper.rb