<commit_before>class LeaveApplicationsController < BaseController

  def collection_scope
    if params[:id]
      LeaveApplication
    else
      LeaveApplication.is_employee(current_user).order(id: :desc)
    end
  end

  private

  def resource_params
    params.require(:leave_application).permit(
      :leave_type, :start_time, :end_time, :description
    ).merge(user_id: current_user.id)<commit_msg>revised collection_scope of leave_application controller<commit_after>class LeaveApplicationsController < BaseController

  def collection_scope
    if params[:id]
      current_user.leave_applications
    else
      current_user.leave_applications.order(id: :desc)
    end
  end

  private

  def resource_params
    params.require(:leave_application).permit(
      :leave_type, :start_time, :end_time, :description
    )
{'fraction_non_alphanumeric': 0.07478890229191798, 'fraction_numerical': 0.0, 'mean_word_length': 4.220125786163522, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4884891', 'n_tokens_mistral': 245, 'n_tokens_neox': 234, 'n_words': 47}