<commit_before>class User < ActiveRecord::Base
  extend FriendlyId
  friendly_id :name, use: :slugged
  
  # Include devise modules. Others available are:
  # :token_authenticatable, :lockable, :timeoutable
  devise :database_authenticatable, :registerable, :recoverable, :rememberable,
         :trackable, :validatable, :omniauthable, :confirmable, :async

  # Setup accessible (or protected) attributes for your model
  attr_accessible :name, :email, :password, :password_confirmation, :remember_me,
    :watchlist_hash, :recommendations_up_to_date, :avatar, :facebook_id, :bio,
    :forem_admin, :slug

  has_attached_file :avatar, :styles => {:thumb => "200x200"},
    :default_url => "http://placekitten.com/g/200/200"
  
  has_many :watchlists
  has_many :reviews
  has_many :quotes

  has_one :staged_import

  has_reputation :karma, :source => [
    {reputation: :review_votes},
    {reputation: :quote_votes}
  ]

  has_reputation :review_votes, source: {reputation: :votes, of: :reviews}
  has_reputation :quote_votes,  source: {reputation: :votes, of: :quotes}

  # Validations
  validates :name,
    :presence   => true,
    :uniqueness => {:case_sensitive => false}
  
  validates :facebook_id, allow_blank: true, uniqueness: true
<commit_msg>Remember users by default.<commit_after>class User < ActiveRecord::Base
  extend FriendlyId
  friendly_id :name, use: :slugged
  
  # Include devise modules. Others available are:
  # :token_authenticatable, :lockable, :timeoutable
  devise :database_authenticatable, :registerable, :recoverable, :rememberable,
         :trackable, :validatable, :omniauthable, :confirmable, :async

  # Remember me by default.
  def remember_me; true; end

  # Setup accessible (or protected) attributes for your model
  attr_accessible :name, :email, :password, :password_confirmation, :remember_me,
    :watchlist_hash, :recommendations_up_to_date, :avatar, :facebook_id, :bio,
    :forem_admin, :slug

  has_attached_file :avatar, :styles => {:thumb => "200x200"},
    :default_url => "http://placekitten.com/g/200/200"
  
  has_many :watchlists
  has_many :reviews
  has_many :quotes

  has_one :staged_import

  has_reputation :karma, :source => [
    {reputation: :review_votes},
    {reputation: :quote_votes}
  ]

  has_reputation :review_votes, source: {reputation: :votes, of: :reviews}
  has_reputation :quote_votes,  source: {reputation: :votes, of: :quotes}

  # Validations
  validates :name,
    :presence   => true,
    :uniqueness => {:case_sensitive => false}
  
  validates :facebook_id, allow_blank: true, uniqueness: true

{'fraction_non_alphanumeric': 0.11566731141199227, 'fraction_numerical': 0.009284332688588007, 'mean_word_length': 4.798206278026906, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6567435', 'n_tokens_mistral': 934, 'n_tokens_neox': 867, 'n_words': 209}