<commit_before>class User < ActiveRecord::Base
  #roles
  # 0 = normal user
  # 1 = supervisor
  # 2 = admin

  devise :database_authenticatable, :registerable,
    :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :mailchimp

  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :password, :password_confirmation, :remember_me, :notify_by_email, :join_mailing_list, :firstname, :lastname, :tagline
  attr_protected :role, :provider, :uid, :active

  #Yeah, let's suppose admins are wise enough not to screw things up
  attr_accessible :email, :tagline, :remember_me, :notify_by_email, :join_mailing_list, :firstname, :lastname, :role, :active, as: :admin

  validates :email, :presence => { :message => "is missing" }
  validates :email, :uniqueness => true
  validates :firstname, :presence => { :message => "is missing"}
  validates :lastname, :presence => { :message => "is missing"}

  has_many :comments
  has_many :followrelations, :class_name => 'Follow', :foreign_key => 'user_id', :dependent => :destroy<commit_msg>Test is implicit in Devise (removed to avoid double errors)<commit_after>class User < ActiveRecord::Base
  #roles
  # 0 = normal user
  # 1 = supervisor
  # 2 = admin

  devise :database_authenticatable, :registerable,
    :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :mailchimp

  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :password, :password_confirmation, :remember_me, :notify_by_email, :join_mailing_list, :firstname, :lastname, :tagline
  attr_protected :role, :provider, :uid, :active

  #Yeah, let's suppose admins are wise enough not to screw things up
  attr_accessible :email, :tagline, :remember_me, :notify_by_email, :join_mailing_list, :firstname, :lastname, :role, :active, as: :admin

  validates :email, :presence => { :message => "is missing" }
  validates :firstname, :presence => { :message => "is missing"}
  validates :lastname, :presence => { :message => "is missing"}

  has_many :comments
  has_many :followrelations, :class_name => 'Follow', :foreign_key => 'user_id', :dependent => :destroy
{'fraction_non_alphanumeric': 0.1260387811634349, 'fraction_numerical': 0.002770083102493075, 'mean_word_length': 5.667692307692308, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, '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': '7614646', 'n_tokens_mistral': 714, 'n_tokens_neox': 675, 'n_words': 202}