@user.errors.add(:email, "Not valid")
If you don’t want to use any attributes, then in your model
@user.errors[:base] << "This person is invalid because ..."
For details: link
@user.errors.add(:email, "Not valid")
If you don’t want to use any attributes, then in your model
@user.errors[:base] << "This person is invalid because ..."
For details: link