tap/app/helpers/products_helper.rb
2015-07-08 17:43:20 +02:00

13 lines
212 B
Ruby

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