This repository has been archived on 2023-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
|
class Followship < ApplicationRecord
|
|
belongs_to :subject_profile, class_name: 'Profile'
|
|
|
|
belongs_to :object_profile, class_name: 'Profile'
|
|
|
|
validates :object_profile,
|
|
exclusion: { in: ->(followship) { [followship.subject_profile] } },
|
|
uniqueness: { scope: :subject_profile }
|
|
end
|