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