Closed SeanLF closed 2 years ago
I encountered the error when upgrading my app to Rails 7:
uninitialized constant Paperclip::Validators::AttachmentSizeValidator::CHECKS
Did anyone figure out this?
I submitted a PR for this: https://github.com/kreeti/kt-paperclip/pull/73
Merged and Fixed.
The
CHECKS
constant (as seen below) no longer exists in Rails 7. It seems to have been replaced byCOMPARE_CHECKS
(there's alsoNUMBER_CHECKS
&RANGE_CHECKS
, though I don't think are relevant in this case)https://github.com/kreeti/kt-paperclip/blob/0b7bb0b455aea0fa961a25c0c74e2bd33ae99ba9/lib/paperclip/validators/attachment_size_validator.rb#L39
https://github.com/rails/rails/blob/ceb4b94baaf17f3a9f4ea795c83ec6c67211f737/activemodel/lib/active_model/validations/numericality.rb#L11-L14