<commit_before>class Admin::RefinerySettingsController < Admin::BaseController

  crudify :refinery_setting, :title_attribute => :title, :order => "name ASC", :searchable => false
          #:conditions => current_user.superuser? ? '' : 'restricted IS false'

  def edit
    @refinery_setting = RefinerySetting.find(params[:id])

    render :layout => false if request.xhr?
  end

  def find_all_refinery_settings
    @refinery_settings = RefinerySetting.find :all,
                                              :order => "name ASC",
                                              :conditions => current_user.superuser? ? "" : "restricted IS false"
  end

  def paginate_all_refinery_settings
    @refinery_settings = RefinerySetting.paginate :page => params[:page],
                                                  :order => "name ASC",
                                                  :conditions => current_user.superuser? ? "" : "restricted IS false"
  end

end<commit_msg>This syntax makes more sense for excluding restricted settings from regular users.<commit_after>class Admin::RefinerySettingsController < Admin::BaseController

  crudify :refinery_setting, :title_attribute => :title, :order => "name ASC", :searchable => false
          #:conditions => current_user.superuser? ? nil : {:restricted => false}

  def edit
    @refinery_setting = RefinerySetting.find(params[:id])

    render :layout => false if request.xhr?
  end

  def find_all_refinery_settings
    @refinery_settings = RefinerySetting.find :all,
                                              :order => "name ASC",
                                              :conditions => current_user.superuser? ? nil : {:restricted => false}
  end

  def paginate_all_refinery_settings
    @refinery_settings = RefinerySetting.paginate :page => params[:page],
                                                  :order => "name ASC",
                                                  :conditions => current_user.superuser? ? nil : {:restricted => false}
  end

end
{'fraction_non_alphanumeric': 0.09847365829640571, 'fraction_numerical': 0.0, 'mean_word_length': 2.074130105900151, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6747930', 'n_tokens_mistral': 510, 'n_tokens_neox': 475, 'n_words': 124}