<% if activity.direct_object.is_a? Actor %> <%= render :partial => 'notifications/activities/like_subject_body' %> <% else %> <%= render :partial => 'notifications/activities/like_object_body'%> <% end %>