<commit_before><% if election_view.present? && post_grid.present? %>
  <%= grid(post_grid, html: {class: 'election grid'}) do |g|
    g.row_attributes do |post|
      if post.board
        {class: "board-post #{post.elected_by}"}
      elsif post.education?
        {class: "education #{post.elected_by}"}
      else
        {class: post.elected_by}
      end
    end

    g.column(name: Post.human_attribute_name(:title), attribute: 'title', assoc: :translations, filter: false) do |post|
      election_post_link(post)
    end

    g.column name: Post.human_attribute_name(:limit), attribute: 'limit', filter: false do |post|
      print_post_limit(post)
    end

    g.column(name: model_name(Council)) do |post|
      link_to(post.council, post.council, target: :blank_p)
    end

    g.column(name: Post.human_attribute_name(:elected_by), attribute: 'elected_by', filter: false) do |post|
      t("model.post.#{post.elected_by}")
    end

    if (election_view.election.state != :not_opened)
      g.column name: models_name(Candidate), filter: false do |post|
        election_view.post_count[post.id] || 0
      end
    end
  end -%>
<% end %><commit_msg>Columns of election table reorganized<commit_after><% if election_view.present? && post_grid.present? %>
  <%= grid(post_grid, html: {class: 'election grid'}) do |g|
    g.row_attributes do |post|
      if post.board
        {class: "board-post #{post.elected_by}"}
      elsif post.education?
        {class: "education #{post.elected_by}"}
      else
        {class: post.elected_by}
      end
    end

    g.column(name: Post.human_attribute_name(:title), attribute: 'title', assoc: :translations, filter: false) do |post|
      election_post_link(post)
    end

    if (election_view.election.state != :not_opened)
      g.column name: models_name(Candidate), filter: false do |post|
        election_view.post_count[post.id] || 0
      end
    end

    g.column name: Post.human_attribute_name(:limit), attribute: 'limit', filter: false do |post|
      print_post_limit(post)
    end

    g.column(name: model_name(Council)) do |post|
      link_to(post.council, post.council, target: :blank_p)
    end

    g.column(name: Post.human_attribute_name(:elected_by), attribute: 'elected_by', filter: false) do |post|
      t("model.post.#{post.elected_by}")
    end
  end -%>
<% end %>
{'fraction_non_alphanumeric': 0.13884156729131175, 'fraction_numerical': 0.0008517887563884157, 'mean_word_length': 3.310091743119266, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6871645', 'n_tokens_mistral': 822, 'n_tokens_neox': 781, 'n_words': 178}