From 889fe05ad3fe7ddaa7270b25870cb22213dd4157 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 4 Dec 2014 14:02:41 -0300 Subject: [PATCH] Do not crash when an activity has no target anymore --- app/views/profile/_profile_activities_list.html.erb | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/app/views/profile/_profile_activities_list.html.erb b/app/views/profile/_profile_activities_list.html.erb index 2f59ab8..bd9048a 100644 --- a/app/views/profile/_profile_activities_list.html.erb +++ b/app/views/profile/_profile_activities_list.html.erb @@ -2,6 +2,7 @@ <% activities.each do |a| %> <% activity = a.klass.constantize.find(a.id) %> <% if activity.kind_of?(ActionTracker::Record) %> + <% next unless activity.target %> <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'wall' } if activity.visible? %> <% else %> <%= render :partial => 'profile_scraps', :locals => { :activity => activity, :scrap => activity } %> -- libgit2 0.21.2