<commit_before># Controller pertaining to accountant functions, usually fulfillments.
class AccountantsController < ApplicationController
  def index
    @patients = Patient.where('fulfillment.fulfilled' => true)
    # change per to 25
    @patients = Kaminari.paginate_array(@patients).page(params[:page]).per(25)


  end

  def search
    @results = Patient.where('fulfillment.fulfilled' => true).where(:name => /#{params[:search]}/i)
    respond_to { |format| format.js }
  end
end<commit_msg>allow only admins to access accounting page<commit_after># Controller pertaining to accountant functions, usually fulfillments.
class AccountantsController < ApplicationController
  before_action :confirm_admin_user
  
  def index
    @patients = Patient.where('fulfillment.fulfilled' => true)
    @patients = Kaminari.paginate_array(@patients).page(params[:page]).per(25)
  end

  def search
    @results = Patient.where('fulfillment.fulfilled' => true).where(:name => /#{params[:search]}/i)
    respond_to { |format| format.js }
  end
end
{'fraction_non_alphanumeric': 0.11969111969111969, 'fraction_numerical': 0.005791505791505791, 'mean_word_length': 4.925714285714286, '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': '1201776', 'n_tokens_mistral': 316, 'n_tokens_neox': 295, 'n_words': 71}