Commit 889fe05ad3fe7ddaa7270b25870cb22213dd4157

Authored by Victor Costa
1 parent cc5d8647

Do not crash when an activity has no target anymore

Some targets was destroyed but the related acitivity still exists.
app/views/profile/_profile_activities_list.html.erb
... ... @@ -2,6 +2,7 @@
2 2 <% activities.each do |a| %>
3 3 <% activity = a.klass.constantize.find(a.id) %>
4 4 <% if activity.kind_of?(ActionTracker::Record) %>
  5 + <% next unless activity.target %>
5 6 <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'wall' } if activity.visible? %>
6 7 <% else %>
7 8 <%= render :partial => 'profile_scraps', :locals => { :activity => activity, :scrap => activity } %>
... ...