I have something like:
<%= "<p class='...'>#{product.value}</p>".html_safe if product.value %>
So I want to show the value wrapped in some html if it exists. Problem is that value is a method that requires some calculations and the way above for every product value is calculated two times which doubles my page loading time.
Any way to optimize this?