tap/app/helpers/products_helper.rb

14 lines
212 B
Ruby
Raw Normal View History

2015-07-08 17:43:20 +02:00
module ProductsHelper
def kcal(calories)
calories.to_s + " kcal"
end
def kcal_tag(calories)
if calories
content_tag :small, kcal(calories)
else
' '.html_safe
end
end
end