Use newer validation syntax for uniqueness in Reaction

This commit is contained in:
Andreas Nedbal 2024-03-19 22:18:56 +01:00 committed by Andreas Nedbal
parent a4a2aba13d
commit 25cbb962dd

View file

@ -4,7 +4,7 @@ class Reaction < ApplicationRecord
belongs_to :parent, polymorphic: true
belongs_to :user
validates_uniqueness_of :parent_id, :scope => :user_id
validates :parent_id, uniqueness: { scope: :user_id }
# rubocop:disable Rails/SkipsModelValidations
after_create do