diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e888fb0b..b0c7140d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## next release - Fix a bug: fix all failing tasks of rake task file chain.rake +- Fix a bug: file_size_validator.rb was broken since ruby v3, see https://github.com/rails/rails/issues/41270 ## v6.2.0 2023 October 13 diff --git a/lib/file_size_validator.rb b/lib/file_size_validator.rb index 328e56f93..526ba1268 100644 --- a/lib/file_size_validator.rb +++ b/lib/file_size_validator.rb @@ -52,7 +52,7 @@ class FileSizeValidator < ActiveModel::EachValidator default_message = options[MESSAGES[key]] errors_options[:message] ||= default_message if default_message - record.errors.add(attribute, MESSAGES[key], errors_options) + record.errors.add(attribute, MESSAGES[key], **errors_options) end end