<commit_before>class Location < ActiveRecord::Base
	def self.default_order
		self.joins(:library).order('libraries.name asc, name asc')
	end
	belongs_to :library
	validates :name, presence: true
	validates :library_id, presence: true
	validates :name, uniqueness: {scope: :library_id}

	has_many :book_locations, dependent: :destroy
	has_many :books, through: :book_locations
	
	def to_s
		"#{self.library} - #{self.name}"
	end
end<commit_msg>add short name to location to get name without parent library<commit_after>class Location < ActiveRecord::Base
	def self.default_order
		self.joins(:library).order('libraries.name asc, name asc')
	end
	belongs_to :library
	validates :name, presence: true
	validates :library_id, presence: true
	validates :name, uniqueness: {scope: :library_id}

	has_many :book_locations, dependent: :destroy
	has_many :books, through: :book_locations
	
	def to_s
		"#{self.library} - #{self.name}"
	end
	def short_name
		self.name
	end
end
{'fraction_non_alphanumeric': 0.10651499482936919, 'fraction_numerical': 0.0, 'mean_word_length': 5.54054054054054, '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': '622425', 'n_tokens_mistral': 334, 'n_tokens_neox': 318, 'n_words': 91}