Sha256: c044210bd6f3d58ec7e5eac3968b3ac50376379acf6a40a12acfbf554b721e48

Contents?: true

Size: 297 Bytes

Versions: 18

Compression:

Stored size: 297 Bytes

Contents

module HasAccountsHelper
  include ActionView::Helpers::NumberHelper
  def currency_fmt(value)
    # We often do get -0.0 but don't like it
    value = 0.0 if value.to_s.match %r{^-[0.]*$}

    number = number_with_precision(value, :precision => 2, :separator => '.', :delimiter => "'")
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
has_accounts_engine-3.0.0.beta15 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta14 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta13 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta12 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta11 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta10 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta9 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta8 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta7 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta6 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta5 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta4 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta3 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta2 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta1 app/helpers/has_accounts_helper.rb
has_accounts_engine-3.0.0.beta0 app/helpers/has_accounts_helper.rb
has_accounts_engine-2.0.1 app/helpers/has_accounts_helper.rb
has_accounts_engine-2.0.0 app/helpers/has_accounts_helper.rb