AR Objects saved with Errors

If I remember correctly, adding an error to an AR object's attribute or :base previously prevented the object from being saved. This is not the current behavior of Active Record.

user = User.last user.errors.add :name, "name doesn't rhyme with orange" user.valid? # => true # => true

user = User.last user.errors.add :base, "my unique error" user.valid? # => true # => true

Is that an intentional change, or an accidental one? Would a patch preventing objects with errors from saving be considered?

valid? resets the state of errors, this has been the case for years:

You can only add to errors during the validation callbacks if you want to prevent the save from happening