<commit_before>ActiveAdmin.register_page "Dashboard" do

  menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }

  content title: proc{ I18n.t("active_admin.dashboard") } do
    # Here is an example of a simple dashboard with columns and panels.
    #
    columns do
      column do
        panel "Últimos anuncios publicados" do
          table_for Ad.includes(:user).limit(90) do 
            column :id
            column :title do |ad|
              link_to ad.title, admin_ad_path(ad)
            end
            column :user
            column :created_at do |ad|
              time_ago_in_words ad.created_at
            end
          end
        end
      end

      column do
        panel "Últimos comentarios publicados" do
          table_for Comment.includes(:ad, :user).last(30) do
            column :id
            column :body do |com|
              link_to com.body, admin_comment_path(com)
            end
            column :user
            column :ad
            column :created_at do |com|
              time_ago_in_words com.created_at
            end
          end
        end
      end
    end<commit_msg>[admin] Show publication date in dashboard<commit_after>ActiveAdmin.register_page "Dashboard" do

  menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }

  content title: proc{ I18n.t("active_admin.dashboard") } do
    # Here is an example of a simple dashboard with columns and panels.
    #
    columns do
      column do
        panel "Últimos anuncios publicados" do
          table_for Ad.includes(:user).limit(90) do 
            column :id
            column :title do |ad|
              link_to ad.title, admin_ad_path(ad)
            end
            column :user
            column :published_at do |ad|
              time_ago_in_words ad.published_at
            end
          end
        end
      end

      column do
        panel "Últimos comentarios publicados" do
          table_for Comment.includes(:ad, :user).last(30) do
            column :id
            column :body do |com|
              link_to com.body, admin_comment_path(com)
            end
            column :user
            column :ad
            column :created_at do |com|
              time_ago_in_words com.created_at
            end
          end
        end
      end
    end
{'fraction_non_alphanumeric': 0.06635071090047394, 'fraction_numerical': 0.007755277897457992, 'mean_word_length': 1.5915178571428572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6113848', 'n_tokens_mistral': 665, 'n_tokens_neox': 648, 'n_words': 196}