<commit_before>class Checkin::GroupsController < ApplicationController

  def index
    @groups = {}
    date = params[:date] ? Date.parse(params[:date]) : Date.today
    CheckinTime.for_date(date, params[:campus]).each do |time|
      @groups[time.time_to_s] = time.groups.order('group_times.ordering')
                                           .select('group_times.print_nametag, group_times.section, groups.*')
                                           .map { |g| [g.id, g.name, g.print_nametag?, g.link_code, g.section] }
                                           .group_by { |g| g[4].to_s }
    end
    respond_to do |format|
      format.json do
        render :text => {
          'groups'     => @groups,
          'updated_at' => GroupTime.last(:order => 'updated_at').updated_at
        }.to_json
      end
    end
  end

end<commit_msg>Fix another old style AR query.<commit_after>class Checkin::GroupsController < ApplicationController

  def index
    @groups = {}
    date = params[:date] ? Date.parse(params[:date]) : Date.today
    CheckinTime.for_date(date, params[:campus]).each do |time|
      @groups[time.time_to_s] = time.groups.order('group_times.ordering')
                                           .select('group_times.print_nametag, group_times.section, groups.*')
                                           .map { |g| [g.id, g.name, g.print_nametag?, g.link_code, g.section] }
                                           .group_by { |g| g[4].to_s }
    end
    respond_to do |format|
      format.json do
        render :text => {
          'groups'     => @groups,
          'updated_at' => GroupTime.order('updated_at').last.updated_at
        }.to_json
      end
    end
  end

end
{'fraction_non_alphanumeric': 0.1266044340723454, 'fraction_numerical': 0.0011668611435239206, 'mean_word_length': 1.8022875816993464, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5618827', 'n_tokens_mistral': 507, 'n_tokens_neox': 498, 'n_words': 97}