Standardize uniqueness validation declaration on Mention (#33247)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-12-10 15:45:13 +00:00
1 parent 3222c19d45
commit e76aff7de5
2 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ class Mention < ApplicationRecord
has_one :notification, as: :activity, dependent: :destroy
validates :account, uniqueness: { scope: :status }
validates :account_id, uniqueness: { scope: :status_id }
scope :active, -> { where(silent: false) }
scope :silent, -> { where(silent: true) }