<commit_before># == Schema Information
#
# Table name: users
#
#  id              :integer          not null, primary key
#  email           :string           not null
#  name            :string
#  password_digest :string
#  created_at      :datetime
#  updated_at      :datetime
#

class User < ApplicationRecord
  has_and_belongs_to_many :accounts
  has_many                :categories, through: :accounts
  has_many                :searches, dependent: :delete_all

  validates_presence_of   :email
  validates_uniqueness_of :email
  validates_format_of     :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
  validates_length_of     :password, minimum: 6, if: :password

  has_secure_password
end
<commit_msg>Easier requests, thanks to through:<commit_after># == Schema Information
#
# Table name: users
#
#  id              :integer          not null, primary key
#  email           :string           not null
#  name            :string
#  password_digest :string
#  created_at      :datetime
#  updated_at      :datetime
#

class User < ApplicationRecord
  has_and_belongs_to_many :accounts
  has_many                :categories,    through:    :accounts
  has_many                :schedules,     through:    :accounts
  has_many                :transactions,  through:    :accounts
  has_many                :searches,      dependent:  :delete_all

  validates_presence_of   :email
  validates_uniqueness_of :email
  validates_format_of     :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
  validates_length_of     :password, minimum: 6, if: :password

  has_secure_password
end

{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.004975124378109453, 'mean_word_length': 2.3661087866108788, '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': '2311550', 'n_tokens_mistral': 533, 'n_tokens_neox': 516, 'n_words': 118}