<commit_before>module RailsAdmin
  module Config
    # Defines a generic label/name/title configuration
    module Labelable
      def self.included(klass)
        klass.register_instance_option(:label) do
          abstract_model.model.model_name.human
        end
        klass.register_instance_option(:object_label) do
          if bindings[:object].respond_to?(:name) && bindings[:object].name
            bindings[:object].name
          elsif bindings[:object].respond_to?(:title) && bindings[:object].title
            bindings[:object].title
          else
            "#{bindings[:object].class.to_s} ##{bindings[:object].id}"
          end
        end
      end
    end
  end
end<commit_msg>modify label() so it looks good for multi-word classes<commit_after>module RailsAdmin
  module Config
    # Defines a generic label/name/title configuration
    module Labelable
      def self.included(klass)
        klass.register_instance_option(:label) do
          abstract_model.model.model_name.titleize
        end
        klass.register_instance_option(:object_label) do
          if bindings[:object].respond_to?(:name) && bindings[:object].name
            bindings[:object].name
          elsif bindings[:object].respond_to?(:title) && bindings[:object].title
            bindings[:object].title
          else
            "#{bindings[:object].class.to_s} ##{bindings[:object].id}"
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10420979986197378, 'fraction_numerical': 0.0, 'mean_word_length': 2.5108958837772395, 'pattern_counts': {'":': 0, '<': 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': '3086382', 'n_tokens_mistral': 401, 'n_tokens_neox': 396, 'n_words': 79}