From 934b447d8896e6c1dc22c10631849980e4dfb1ac Mon Sep 17 00:00:00 2001 From: Henry Pate Date: Mon, 20 Mar 2023 14:25:00 -0600 Subject: [PATCH] Ruby 3 compability. https://github.com/thoughtbot/paperclip/pull/2674 --- 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