Sha256: 49ab8afd8c46cce8ae96213f7e37b595eb10a56ae0d3b191b9c8967ce26e872c

Contents?: true

Size: 457 Bytes

Versions: 9

Compression:

Stored size: 457 Bytes

Contents

module KktShoppe
  module ViewHelpers
    
    # Returns currency values with the currency unit as specified by the KktShoppe settings
    def number_to_currency(number, options = {})
      options[:unit] ||= KktShoppe.settings.currency_unit
      super
    end

    # Returns a number of kilograms with the appropriate suffix
    def number_to_weight(kg)
      "#{kg}#{t('kkt_shoppe.helpers.number_to_weight.kg', :default => 'kg')}"
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kkt_shoppe-2.0.2 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-2.0.1 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-2.0.0 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.3.0 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.2.1 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.2.0 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.1.2 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.1.1 lib/kkt_shoppe/view_helpers.rb
kkt_shoppe-1.1.0 lib/kkt_shoppe/view_helpers.rb