thirteen-tien-len/app/models/relationship.rb
2023-11-21 17:19:33 +00:00

9 lines
311 B
Ruby

class Relationship < ActiveRecord::Base
belongs_to :follower, class_name: "User"
validates :follower_id, presence: true
belongs_to :followable, polymorphic: true
# belongs_to :followed, class_name: "Profile"
# validates :followed_id, presence: true
# belongs_to :followerable, polymorphic: true
end