13 lines
395 B
Ruby
13 lines
395 B
Ruby
class Project < ActiveRecord::Base
|
|
belongs_to :user
|
|
has_many :microposts, as: :micropostable
|
|
has_many :passive_relationships, class_name: "Relationship",
|
|
foreign_key: "followed_id",
|
|
dependent: :destroy
|
|
has_many :followers, through: :passive_relationships, source: :follower
|
|
|
|
def display_name
|
|
title
|
|
end
|
|
end
|