I have a field named image_url storing the image path like /images/employees/luke.jpg. It's a varchar field in mysql and maybe null but
I don't understand why I always get a nil value.

Here is the view
PHP Code:
<% if employee.image_url.nil? or employee.image_url.empty? -%>  
td>No image yet!</td>
    <% else %>  
td><%= image_tag(employee.image_url, :alt => employee.name, :size => "100x80", :border => 1) %></td>
end -%> 
PHP Code:
<%= debug employee %> 
shows that employee.image_url is not null because it displays correctly /images/employees/luke.jpg but I still get the "No image yet!" message instead of the image.

Any idea? I suspect the underscore because the 2 fields including underscores are not properly shown...