<commit_before>class ActorsController < ApplicationController
  before_action :store_location
  before_action :authenticate_user!
  load_and_authorize_resource

  before_action :set_current_user, only: [:create, :link_actor]
  before_action :set_actor, except: [:index, :new, :create, :show, :edit]
  before_action :set_actor_preload, only: [:show, :edit]
  before_action :actor_filters, only: :index
  before_action :set_type
  before_action :set_selection, only: [:new, :edit, :show, :create, :update]
  before_action :set_micro_selection, only: [:new, :create]
  before_action :set_parents, only: :membership
  before_action :set_memberships, only: [:show, :membership]

  def index
    @actors = if current_user && current_user.admin?
                type_class.order(:name).filter_actors(actor_filters).page params[:page]
              else
                type_class.order(:name).filter_actives.page params[:page]
              end
  end

  def show
  end
<commit_msg>provide categories collection to the actors index view<commit_after>class ActorsController < ApplicationController
  before_action :store_location
  before_action :authenticate_user!
  load_and_authorize_resource

  before_action :set_current_user, only: [:create, :link_actor]
  before_action :set_actor, except: [:index, :new, :create, :show, :edit]
  before_action :set_actor_preload, only: [:show, :edit]
  before_action :actor_filters, only: :index
  before_action :set_type
  before_action :set_selection, only: [:new, :edit, :show, :create, :update, :index]
  before_action :set_micro_selection, only: [:new, :create]
  before_action :set_parents, only: :membership
  before_action :set_memberships, only: [:show, :membership]

  def index
    @categories = Category.where(type: ["OtherDomain", "SocioCulturalDomain"]).order(:name)
    @actors = if current_user && current_user.admin?
                type_class.order(:name).filter_actors(actor_filters).page params[:page]
              else
                type_class.order(:name).filter_actives.page params[:page]
              end
  end

  def show
  end

{'fraction_non_alphanumeric': 0.1067496409765438, 'fraction_numerical': 0.0, 'mean_word_length': 4.529100529100529, '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': '4023758', 'n_tokens_mistral': 672, 'n_tokens_neox': 649, 'n_words': 152}