Commit f504fc9e by Jörg Schiller

Avoid deprecated method to add error

Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. Please call `ActiveModel::Errors#add` instead.
parent 30f82f17
......@@ -316,7 +316,7 @@ module ActiveRecord
def validate_each(record, attribute, value)
# if association is soft destroyed, add an error
if value.present? && value.paranoia_destroyed?
record.errors[attribute] << 'has been soft-deleted'
record.errors.add(attribute, 'has been soft-deleted')
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment