When, e.g. a User model with an missing but mandatory email attribute is missing, the validation error becomes: "Validation failed: Email must exist"
.
Is there a reason why the name of the model is not included?
For demonstrating purposes: if the line at https://github.com/rails/rails/blob/83217025a171593547d1268651b446d3533e2019/activemodel/lib/active_model/error.rb#L19
is changed to: attribute = "#{base_class.name} #{attribute}"
this error message can become: “Validation failed: User email must exist” which is more explanatory.
It becomes convenient especially when multiple objects with the same attribute names are present.