From 32bf0022a0a4b6125ba38088bf5bc197b269c3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Tue, 23 Feb 2021 16:59:12 -0500 Subject: [PATCH] Closes #2673. Fixes incompatibility with ruby 3.0, see https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ --- lib/paperclip/validators/attachment_presence_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paperclip/validators/attachment_presence_validator.rb b/lib/paperclip/validators/attachment_presence_validator.rb index 0a6431b28..493ab3c71 100644 --- a/lib/paperclip/validators/attachment_presence_validator.rb +++ b/lib/paperclip/validators/attachment_presence_validator.rb @@ -5,7 +5,7 @@ module Validators class AttachmentPresenceValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if record.send("#{attribute}_file_name").blank? - record.errors.add(attribute, :blank, options) + record.errors.add(attribute, :blank, **options) end end