2023-11-15 16:11:32 +00:00

14 lines
419 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
has_many :microposts, as: :micropostable
def display_name
name
end
end