module Shoppe::ViewHelpers
Public Instance Methods
number_to_currency(number, options = {})
click to toggle source
Returns currency values with the currency unit as specified by the Shoppe
settings
Calls superclass method
# File lib/shoppe/view_helpers.rb, line 5 def number_to_currency(number, options = {}) options[:unit] ||= Shoppe.settings.currency_unit super end
number_to_weight(kg)
click to toggle source
Returns a number of kilograms with the appropriate suffix
# File lib/shoppe/view_helpers.rb, line 11 def number_to_weight(kg) "#{kg}#{t('shoppe.helpers.number_to_weight.kg', :default => 'kg')}" end