Sha256: e6bc6db344526a0484203048b707c4b24a0140ae846cccffc0fbe104a6d4f5e8

Contents?: true

Size: 274 Bytes

Versions: 11

Compression:

Stored size: 274 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'i18n'
require 'money'

module HappyHelpers
  module Helpers
    module Numbers
      def currency(v, options = {})
        money = v.respond_to?(:to_money) ? v.to_money : Money.new(v * 100)
        money.format
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
happy-helpers-0.1.0.pre15 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre14 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre13 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre12 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre11 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre10 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre9 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre8 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre7 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre6 lib/happy-helpers/helpers/numbers.rb
happy-helpers-0.1.0.pre.6 lib/happy-helpers/helpers/numbers.rb