<commit_before>class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable
         # :confirmable
         
  include PgSearch
  multisearchable :against => :username
  
	has_many :experiences
	
	has_many :active_relationships,  class_name:  "Relationship",
	                                   foreign_key: "follower_id",
	                                   dependent:   :destroy
	has_many :passive_relationships, class_name:  "Relationship",
	                                   foreign_key: "followed_id",
	                                   dependent:   :destroy

	has_many :following, through: :active_relationships,  source: :followed
	has_many :followers, through: :passive_relationships, source: :follower



	def follow(other_user)
	  active_relationships.create(followed_id: other_user.id)
	end

	def unfollow(other_user)
	  active_relationships.find_by(followed_id: other_user.id).destroy
	end

	def following?(other_user)
	  following.include?(other_user)
	end
	
end



<commit_msg>remove registerable devise  from model<commit_after>class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, 
         :recoverable, :rememberable, :trackable, :validatable
         # :confirmable
         
  include PgSearch
  multisearchable :against => :username
  
	has_many :experiences
	
	has_many :active_relationships,  class_name:  "Relationship",
	                                   foreign_key: "follower_id",
	                                   dependent:   :destroy
	has_many :passive_relationships, class_name:  "Relationship",
	                                   foreign_key: "followed_id",
	                                   dependent:   :destroy

	has_many :following, through: :active_relationships,  source: :followed
	has_many :followers, through: :passive_relationships, source: :follower



	def follow(other_user)
	  active_relationships.create(followed_id: other_user.id)
	end

	def unfollow(other_user)
	  active_relationships.find_by(followed_id: other_user.id).destroy
	end

	def following?(other_user)
	  following.include?(other_user)
	end
	
end




{'fraction_non_alphanumeric': 0.07656710138830458, 'fraction_numerical': 0.0, 'mean_word_length': 2.7987220447284344, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1156050', 'n_tokens_mistral': 745, 'n_tokens_neox': 671, 'n_words': 147}