<commit_before>class Rol < ActiveRecord::Base

# validations
  validates :nombre, presence: true, uniqueness: true

# relationships
  has_many :user_rols, dependent: :destroy
  has_many :users, through: :user_rols

# class methods:
  def self.docente
    @@docente ||= find_by nombre: "Docente"
  end

end<commit_msg>agregado Rol#alumno que devuelve la instancia del rol Alumno<commit_after>class Rol < ActiveRecord::Base

# validations
  validates :nombre, presence: true, uniqueness: true

# relationships
  has_many :user_rols, dependent: :destroy
  has_many :users, through: :user_rols

# class methods:
  def self.docente
    @@docente ||= find_by nombre: "Docente"
  end
  def self.alumno
    @@alumno ||= find_by nombre: "Alumno"
  end

end
{'fraction_non_alphanumeric': 0.09906291834002677, 'fraction_numerical': 0.0, 'mean_word_length': 4.753846153846154, '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': '7011464', 'n_tokens_mistral': 263, 'n_tokens_neox': 257, 'n_words': 72}