Topic: how to check for null value
how do i check for a null value?
<% if ingredient.name.empty? then %>
<% puts "nothing here!!!" %>
<% else %>
(<%=h ingredient.time %> minutes) with <%=h ingredient.tool %>
<% end %>
i'm getting
You have a nil object when you didn't expect it!
i'm sure this is an easy one but i have been looking for a while with no help so far.
thanks in advance.