<commit_before><%= div_for activity, :class => 'root media' do %>
  <div class="avatar pull-left">
    <div class="media-object">
      <%= link_to image_tag(activity.sender_subject.logo.url('small'),
        :alt => activity.sender_subject.name), activity.sender_subject %>
    </div>
  </div>
  <header class="media-heading">
    <%= activity.title(self) %>

    <% if activity.direct_object && can?(:destroy, activity.direct_object) %>
    <div class="x" style="float: right"> 
      <%= link_to ('X'), activity.direct_object , :confirm => t('confirm_delete', 
                    :scope => activity.direct_object.class.to_s.underscore), :method => :delete,  
                    :remote => true %> 
    </div>
    <% end %>
  </header>

  <div class="media-body">
    <section class="objects">
      <%= render partial: 'activity_objects/timeline', 
                 collection: activity.activity_objects,
                 as: :object %>
    </section>

    <%= render :partial => 'activities/actions',
               :locals => { :activity => activity } %>

    <%= render :partial => 'activities/likes',
               :locals => { :activity => activity } %>

    <%= render :partial => 'activities/comments',
               :locals => { :activity => activity } %>
<commit_msg>Do not show destroy link for actor in timeline<commit_after><%= div_for activity, :class => 'root media' do %>
  <div class="avatar pull-left">
    <div class="media-object">
      <%= link_to image_tag(activity.sender_subject.logo.url('small'),
        :alt => activity.sender_subject.name), activity.sender_subject %>
    </div>
  </div>
  <header class="media-heading">
    <%= activity.title(self) %>

    <% if activity.direct_object && !activity.direct_object.acts_as_actor? && can?(:destroy, activity.direct_object) %>
    <div class="x" style="float: right"> 
      <%= link_to ('X'), activity.direct_object , :confirm => t('confirm_delete', 
                    :scope => activity.direct_object.class.to_s.underscore), :method => :delete,  
                    :remote => true %> 
    </div>
    <% end %>
  </header>

  <div class="media-body">
    <section class="objects">
      <%= render partial: 'activity_objects/timeline', 
                 collection: activity.activity_objects,
                 as: :object %>
    </section>

    <%= render :partial => 'activities/actions',
               :locals => { :activity => activity } %>

    <%= render :partial => 'activities/likes',
               :locals => { :activity => activity } %>

    <%= render :partial => 'activities/comments',
               :locals => { :activity => activity } %>

{'fraction_non_alphanumeric': 0.17266187050359713, 'fraction_numerical': 0.0, 'mean_word_length': 2.624142661179698, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6425747', 'n_tokens_mistral': 820, 'n_tokens_neox': 754, 'n_words': 157}