<commit_before>require 'textacular/searchable'

class User < ActiveRecord::Base

  devise *[
    :database_authenticatable,
    :registerable,
    :recoverable,
    :rememberable,
    :confirmable,
    :lockable,
    :trackable
  ]

  extend Searchable :username, :email, :phone, :alt_phone

  GENDERS = %w[male female]

  default_scope ->{ order('users.id ASC') }

  scope :actives, -> { where({ members: { active: true } }) }

  validates :username, presence: true, uniqueness: true
  validates :email, presence: true, uniqueness: true
  # validates :gender, presence: true, inclusion: {in: GENDERS}

  has_many :members
  accepts_nested_attributes_for :members<commit_msg>Update _links.erb<commit_after>require 'textacular/searchable'

class User < ActiveRecord::Base

  devise *[
    :database_authenticatable,
    # :registerable,
    :recoverable,
    :rememberable,
    :confirmable,
    :lockable,
    :trackable
  ]

  extend Searchable :username, :email, :phone, :alt_phone

  GENDERS = %w[male female]

  default_scope ->{ order('users.id ASC') }

  scope :actives, -> { where({ members: { active: true } }) }

  validates :username, presence: true, uniqueness: true
  validates :email, presence: true, uniqueness: true
  # validates :gender, presence: true, inclusion: {in: GENDERS}

  has_many :members
  accepts_nested_attributes_for :members
{'fraction_non_alphanumeric': 0.11946902654867257, 'fraction_numerical': 0.0, 'mean_word_length': 4.219230769230769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3467847', 'n_tokens_mistral': 453, 'n_tokens_neox': 426, 'n_words': 108}