I have this piece of code that doesn't seem to work for a strange reason:

```
    <% if (@user.photo.blank?) %>               
        <%= image_tag("empty_profile_pic.png") %> <!-- replace with user's image -->
    <%else %>
        <%= image_tag(@user.photo.url(:small)) %> 
    <% end %>

```

If the picture is null in the mySQL database I want it to display another pic.
I have tried, `empty?, nil?, blank?` but with no success, and also

```
 @user.photo.blank.url.*

```

Any help?