<%# The activity shouldn't be nil, but we're wearing a belt and suspenders. %>
<%- unless activity.item.nil? -%>
<li>
  <div class="profile-image">
    <%= image_link activity.person, :image => :thumbnail %>
    <%= feed_icon activity %>
  </div>
  <p><%= feed_message activity %></p>
  <p class="meta published">
    <%= time_ago_in_words(activity.created_at).capitalize %> ago
  </p>
  <%- if current_person?(activity.person) -%>
    <p><%= link_to(image_tag("icons/close.gif"), 
                  activity_path(activity), 
                  :method => :delete, :confirm => "Are you sure you want to delete this activity from your profile?") %>
    </p>
  <%- end -%>
</li>
<%- end -%>

<%# The activity shouldn't be nil, but we're wearing a belt and suspenders. %>
<%- unless activity.item.nil? -%>
<li>
  <div class="profile-image">
    <%= image_link activity.person, :image => :thumbnail %>
    <%= feed_icon activity %>
  </div>
  <p>
    <%= feed_message activity %>
      <%- if current_person?(activity.person) -%>
        <%= link_to(image_tag("icons/close.gif"), 
                          activity_path(activity), 
                          :method => :delete, 
                          :confirm => %(Are you sure you want to delete 
                                        this activity from your profile?)) %>
  <%- end -%>
    </p>
  <p class="meta published">
    <%= time_ago_in_words(activity.created_at).capitalize %> ago
  </p>

</li>
<%- end -%>

Put activity delete icon in a better place
Put activity delete icon in a better place
