From 25cbb962ddb185126b1bba3baa3427ca12c3ed84 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Tue, 19 Mar 2024 22:18:56 +0100 Subject: [PATCH] Use newer validation syntax for uniqueness in Reaction --- app/models/reaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/reaction.rb b/app/models/reaction.rb index 4a40e325..e1b54ce3 100644 --- a/app/models/reaction.rb +++ b/app/models/reaction.rb @@ -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