app/views/tasks/_task_icon.html.erb
<%
icon_info = task.icon
if icon_info[:type] == :profile_image
icon = profile_image(icon_info[:profile], :minor)
elsif icon_info[:type] == :defined_image
icon = "<img src='#{icon_info[:src]}' alt='#{icon_info[:name]}' />".html_safe
end
if icon_info[:url]
icon = link_to(icon, icon_info[:url])
end
%>
<div class="task_icon">
<%= icon %>
</div>