<commit_before>class GitolitePublicKeysController < ApplicationController
  unloadable
  
  before_filter :require_login
  before_filter :set_user_variable
  before_filter :find_gitolite_public_key, :except => [:index, :new, :create]

  def index
    @status = if (session[:gitolite_public_key_filter_status]=params[:status]).nil?
      GitolitePublicKey::STATUS_ACTIVE
    elsif params[:status].blank?
        nil
    else 
      params[:status].to_i != 0
    end
    c = ARCondition.new(@status ? ["active=?", @status] : nil)

    @gitolite_public_keys = @user.gitolite_public_keys.all(:order => 'active DESC, created_at DESC', :conditions => c.conditions)
    respond_to do |format|
      format.html # index.html.erb<commit_msg>moved from ARCondition to scope<commit_after>class GitolitePublicKeysController < ApplicationController
  unloadable
  
  before_filter :require_login
  before_filter :set_user_variable
  before_filter :find_gitolite_public_key, :except => [:index, :new, :create]

  def index
    @status = if (session[:gitolite_public_key_filter_status]=params[:status]).nil?
      GitolitePublicKey::STATUS_ACTIVE
    elsif params[:status].blank?
        nil
    else 
      params[:status].to_i != 0
    end
    
    scope = @user.gitolite_public_keys
    scope = scope.scoped(:conditions => ["active=?", @status]) if @status
    @gitolite_public_keys = scope.all(:order => 'active DESC, created_at DESC')

    respond_to do |format|
      format.html # index.html.erb
{'fraction_non_alphanumeric': 0.10961667787491594, 'fraction_numerical': 0.0013449899125756557, 'mean_word_length': 4.257950530035336, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5319155', 'n_tokens_mistral': 481, 'n_tokens_neox': 464, 'n_words': 94}