Standardize uniqueness validation declaration on Mention
(#33247)
This commit is contained in:
parent
3222c19d45
commit
e76aff7de5
2 changed files with 8 additions and 2 deletions
|
@ -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) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue