You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) Error:
Sip::AnexoTest#test_no_valido_1:
ArgumentError: wrong number of arguments (given 3, expected 1..2)
/home/travis/build/pasosdeJesus/sip/vendor/bundle/ruby/3.0.0/gems/activemodel-6.1.3/lib/active_model/errors.rb:404:in `add'
/home/travis/build/pasosdeJesus/sip/vendor/bundle/ruby/3.0.0/gems/paperclip-6.1.0/lib/paperclip/validators/attachment_presence_validator.rb:8:in `validate_each'
...
and
2) Error:
Sip::AnexoTest#test_no_valido_2:
ArgumentError: wrong number of arguments (given 3, expected 1..2)
/home/travis/build/pasosdeJesus/sip/vendor/bundle/ruby/3.0.0/gems/activemodel-6.1.3/lib/active_model/errors.rb:404:in `add'
/home/travis/build/pasosdeJesus/sip/vendor/bundle/ruby/3.0.0/gems/paperclip-6.1.0/lib/paperclip/validators/attachment_presence_validator.rb:8:in `validate_each'
...
Both are related to expressions anexo.valid? where anexo is amodel with a paperclip attachment. Both use the validator AttachmetntPresenceValidator that includes the statement producing the error:
def validate_each(record, attribute, value)
if record.send("#{attribute}_file_name").blank?
record.errors.add(attribute, :blank, *options)
end
end
The regression tests of an open source rails engine called sip, that uses paperclip, work good with Ruby 2.7 as can be seen at:
https://travis-ci.org/github/pasosdeJesus/sip/jobs/760216853
However with Ruby 3.0 the following errors appear (as can be seen at https://travis-ci.org/github/pasosdeJesus/sip/jobs/760216854#L976):
and
Both are related to expressions
anexo.valid?whereanexois amodel with a paperclip attachment. Both use the validatorAttachmetntPresenceValidatorthat includes the statement producing the error: