How to prevent image_tag helper throwing exception if the ur


#1

If I store the path/filename of an image in the database how do I
prevent “image_tag” helper from throwing an exception if a filename/path
has not been set?

<%= image_tag @product.image %>
or
<%= image_tag url_for_file_column(“product”, “image”) %>

Many thanks, K.