<commit_before><% if defined? i %>
  <% if i == 6 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 12 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 18 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 24 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
<% end %>

<% if ad.user %>
  <div class="ad_excerpt_home">
    <% if ad.image.exists? %>
      <div class="ad_list_image">
        <%= link_to adslug_path(ad,ad.slug) do %>
          <%= image_tag ad.image.url(:thumb), title: ad.title, alt: ad.title %>
        <% end %>
      </div>
    <% end %>
    <% if can? :update, ad %>
      <div class="ad_edit">
        <%= link_to ads_edit_path(ad.id) do %>
          <%= image_tag "edit_ad.png", :alt => t('nlt.edit_this_ad') %>
          &nbsp; <%= t('nlt.edit_this_ad') %>
        <% end %>
      </div>
    <% end %>
    <h4>
      <%= link_to adslug_path(ad,ad.slug) do %>
        <%= ad.title %>
      <% end %>
    </h4>
    <div class="ad_excerpt_woeid">
      <%= link_to ads_woeid_path(id: ad.woeid_code, type: ad.type_class) do %>
        <%= WoeidHelper.convert_woeid_name ad.woeid_code %> &gt;
        <%= ad.type_string %>
      <% end %>
    </div>
    <% if ad.is_give? %>
      <span class="ad_status <%= ad.status_class %>">
        <%= ad.status_string %>
      </span>
    <% end %>
    <span class="ad_date">
      <%= t('nlt.published_on_html', date: ad.created_at) %>
      <%= t('nlt.by_user') %>
      <%= link_to ad.user.username, listads_user_path(ad.user) %>
    </span>
    <div><p><%= ad.body %></p></div>
    <div class="ad_meta_info">
      <b><%= link_to t('nlt.send_a_message'), message_new_with_subject_path(user_id: ad.user.id, subject: ad.slug) %></b>
      <b><%= link_to t('nlt.write_a_comment'), adslug_path(ad,ad.slug) %></b>
      &nbsp;&nbsp; <%= t('nlt.readed_count', count: ad.readed_counter) %>
    </div>
  </div>
<% end %>

<% if defined? i %>
  <% if params[:action] == "show" and params[:controller] == "woeid" and i == 0 %>
    <%= render :partial => "partials/google_adsense", :locals => { :class_name => "vertical_ad" }  %>
  <% end %>
<% end %><commit_msg>[ads] truncate body on partial<commit_after><% if defined? i %>
  <% if i == 6 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 12 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 18 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
  <% if i == 24 %>
    <%= render partial: "partials/google_adsense"%>
  <% end %>
<% end %>

<% if ad.user %>
  <div class="ad_excerpt_home">
    <% if ad.image.exists? %>
      <div class="ad_list_image">
        <%= link_to adslug_path(ad,ad.slug) do %>
          <%= image_tag ad.image.url(:thumb), title: ad.title, alt: ad.title %>
        <% end %>
      </div>
    <% end %>
    <% if can? :update, ad %>
      <div class="ad_edit">
        <%= link_to ads_edit_path(ad.id) do %>
          <%= image_tag "edit_ad.png", :alt => t('nlt.edit_this_ad') %>
          &nbsp; <%= t('nlt.edit_this_ad') %>
        <% end %>
      </div>
    <% end %>
    <h4>
      <%= link_to adslug_path(ad,ad.slug) do %>
        <%= ad.title %>
      <% end %>
    </h4>
    <div class="ad_excerpt_woeid">
      <%= link_to ads_woeid_path(id: ad.woeid_code, type: ad.type_class) do %>
        <%= WoeidHelper.convert_woeid_name ad.woeid_code %> &gt;
        <%= ad.type_string %>
      <% end %>
    </div>
    <% if ad.is_give? %>
      <span class="ad_status <%= ad.status_class %>">
        <%= ad.status_string %>
      </span>
    <% end %>
    <span class="ad_date">
      <%= t('nlt.published_on_html', date: ad.created_at) %>
      <%= t('nlt.by_user') %>
      <%= link_to ad.user.username, listads_user_path(ad.user) %>
    </span>
    <div><p><%= truncate ad.body, length: 300, separator: ' ' %></p></div>
    <div class="ad_meta_info">
      <b><%= link_to t('nlt.send_a_message'), message_new_with_subject_path(user_id: ad.user.id, subject: ad.slug) %></b>
      <b><%= link_to t('nlt.write_a_comment'), adslug_path(ad,ad.slug) %></b>
      &nbsp;&nbsp; <%= t('nlt.readed_count', count: ad.readed_counter) %>
    </div>
  </div>
<% end %>

<% if defined? i %>
  <% if params[:action] == "show" and params[:controller] == "woeid" and i == 0 %>
    <%= render :partial => "partials/google_adsense", :locals => { :class_name => "vertical_ad" }  %>
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.21871527006001334, 'fraction_numerical': 0.005112247166036897, 'mean_word_length': 2.673469387755102, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 159, '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': '1278156', 'n_tokens_mistral': 1934, 'n_tokens_neox': 1741, 'n_words': 318}