Forgot to commit helper
This commit is contained in:
parent
ee86411d58
commit
595d8ed282
1 changed files with 13 additions and 0 deletions
13
app/helpers/products_helper.rb
Normal file
13
app/helpers/products_helper.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
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
|
Loading…
Reference in a new issue