Sha256: 102d8c19834c52c4efc0e3818731c2901bb7afb9be01f50061857c74614ed02e

Contents?: true

Size: 444 Bytes

Versions: 19

Compression:

Stored size: 444 Bytes

Contents

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

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

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
shoppe-1.1.2 lib/shoppe/view_helpers.rb
shoppe-1.1.1 lib/shoppe/view_helpers.rb
shoppe-1.1.0 lib/shoppe/view_helpers.rb
shoppe-1.0.9 lib/shoppe/view_helpers.rb
shoppe-1.0.8 lib/shoppe/view_helpers.rb
kylekthompson-shoppe-1.0.7 lib/shoppe/view_helpers.rb
shoppe-1.0.7 lib/shoppe/view_helpers.rb
shoppe-1.0.6 lib/shoppe/view_helpers.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/shoppe-1.0.5/lib/shoppe/view_helpers.rb
shoppe-1.0.5 lib/shoppe/view_helpers.rb
shoppe-1.0.3 lib/shoppe/view_helpers.rb
shoppe-1.0.2 lib/shoppe/view_helpers.rb
shoppe-1.0.1 lib/shoppe/view_helpers.rb
shoppe-1.0.0 lib/shoppe/view_helpers.rb
shoppe-0.0.21 lib/shoppe/view_helpers.rb
shoppe-0.0.20 lib/shoppe/view_helpers.rb
shoppe-0.0.19 lib/shoppe/view_helpers.rb
shoppe-0.0.18 lib/shoppe/view_helpers.rb
shoppe-0.0.17 lib/shoppe/view_helpers.rb