2023-11-11 11:34:52 +00:00

9 lines
341 B
Ruby

class Profile < ActiveRecord::Base
belongs_to :user
has_many :social_links
has_many :passive_relationships, class_name: "Relationship",
foreign_key: "followed_id",
dependent: :destroy
has_many :followers, through: :passive_relationships, source: :follower
end