<commit_before>module Hancock::RailsAdminPatch
  extend ActiveSupport::Concern

  def rails_admin_model
    self.class.rails_admin_model
  end

  module ClassMethods
    def rails_admin_model
      to_param.gsub("::", "~").underscore
    end

    def rails_admin_add_fields
      {}
    end

    def rails_admin_add_config(config)
    end



    def admin_can_default_actions
      [:manage].frozen
    end
    def admin_can_add_actions
      [].frozen
    end
    def admin_can_actions
      (admin_can_default_actions + admin_can_add_actions)
    end
    def admin_cannot_actions
      [].frozen
    end

    def manager_can_default_actions
      [:show, :read, :new, :create, :edit, :update].frozen
    end
    def manager_can_add_actions
      [].frozen
    end
    def manager_can_actions
      (manager_can_default_actions + manager_can_add_actions).uniq.frozen
    end
    def manager_cannot_actions
      [].frozen
    end

    def rails_admin_default_visible_actions
      [:comments, :model_comments].frozen
    end
    def rails_admin_add_visible_actions
      [].frozen
    end
    def rails_admin_visible_actions
    (  rails_admin_default_visible_actions + rails_admin_add_visible_actions).uniq.frozen
    end

  end
end<commit_msg>speed by freeze<commit_after>module Hancock::RailsAdminPatch
  extend ActiveSupport::Concern

  def rails_admin_model
    self.class.rails_admin_model
  end

  module ClassMethods
    def rails_admin_model
      to_param.gsub("::", "~").underscore
    end

    def rails_admin_add_fields
      {}
    end

    def rails_admin_add_config(config)
    end



    def admin_can_default_actions
      [:manage].freeze
    end
    def admin_can_add_actions
      [].freeze
    end
    def admin_can_actions
      (admin_can_default_actions + admin_can_add_actions).uniq.freeze
    end
    def admin_cannot_actions
      [].freeze
    end

    def manager_can_default_actions
      [:show, :read, :new, :create, :edit, :update].freeze
    end
    def manager_can_add_actions
      [].freeze
    end
    def manager_can_actions
      (manager_can_default_actions + manager_can_add_actions).uniq.freeze
    end
    def manager_cannot_actions
      [].freeze
    end

    def rails_admin_default_visible_actions
      [:comments, :model_comments].freeze
    end
    def rails_admin_add_visible_actions
      [].freeze
    end
    def rails_admin_visible_actions
      (rails_admin_default_visible_actions + rails_admin_add_visible_actions).uniq.freeze
    end

  end
end
{'fraction_non_alphanumeric': 0.06225059856344772, 'fraction_numerical': 0.0, 'mean_word_length': 3.024077046548957, 'pattern_counts': {'":': 2, '<': 3, '<?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': '2005401', 'n_tokens_mistral': 869, 'n_tokens_neox': 798, 'n_words': 153}