I barely use them in my projects. Is this normal? If I need to return just one line of html, say an image tag for a gravatar, then a helper is great:
def gravatar_for(user, height=90, width=90, alt=user.name + "'s gravtatar")
gravatar_address = 'http://1.gravatar.com/avatar/'
clean_email = user.email.strip.downcase
hash = Digest::MD5.hexdigest(clean_email)
image_tag gravatar_address + hash, height: height, width: width, alt: alt
end
However, if I want to loop through some errors, and return html structure rather than a single line, it quickly gets difficult.
Is a good rule of thumb if you want to return one line of html then use a helper, else use a partial to return more complex html?