<commit_before>class AdminController < ApplicationController
  before_action :require_admin

  def require_admin
    verboten! unless current_user.super_admin?
  end

  def dashboard
    @recent_organizations = Organization.where('created_at > ?', 1.week.ago)
    @recent_users = User.where('created_at > ?', 1.week.ago)
    @active_users = User.where('last_request_at > ?', 1.week.ago.utc)
    @top_10_other = Item.by_partner_key('other').where.not(name: "Other").group(:name).limit(10).order('count_name DESC').count(:name)
    @donation_count = Donation.where('created_at > ?', 1.week.ago).count
    @distribution_count = Distribution.where('created_at > ?', 1.week.ago).count
    @request_count = Request.where('created_at > ?', 1.week.ago).count
    @organization_count = Organization.all.count
  end
end<commit_msg>Sort the recent users on the admin dashboard by organization.<commit_after>class AdminController < ApplicationController
  before_action :require_admin

  def require_admin
    verboten! unless current_user.super_admin?
  end

  def dashboard
    @recent_organizations = Organization.where('created_at > ?', 1.week.ago)
    @recent_users = User.where('created_at > ?', 1.week.ago)
    @active_users = User.where('last_request_at > ?', 1.week.ago.utc).includes(:organization).order('organizations.name')
    @top_10_other = Item.by_partner_key('other').where.not(name: "Other").group(:name).limit(10).order('count_name DESC').count(:name)
    @donation_count = Donation.where('created_at > ?', 1.week.ago).count
    @distribution_count = Distribution.where('created_at > ?', 1.week.ago).count
    @request_count = Request.where('created_at > ?', 1.week.ago).count
    @organization_count = Organization.all.count
  end
end
{'fraction_non_alphanumeric': 0.1417910447761194, 'fraction_numerical': 0.011481056257175661, 'mean_word_length': 4.969178082191781, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5881568', 'n_tokens_mistral': 585, 'n_tokens_neox': 552, 'n_words': 86}