I use the following to find wether a model has an associated attachment:
<% if @agent.avatar.file? %>
<%= image_tag @agent.avatar.url(:normal) %>
<% else %>
No attachment available!
<% end %>
I use the following to find wether a model has an associated attachment:
<% if @agent.avatar.file? %>
<%= image_tag @agent.avatar.url(:normal) %>
<% else %>
No attachment available!
<% end %>