mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:29:53 +01:00
Use newer validation syntax for uniqueness in Reaction
This commit is contained in:
parent
a4a2aba13d
commit
25cbb962dd
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue