I have run into a scenario that I can't find anywhere on the internet for some reason.
I have a custom validator like so.
if sectors.size > 5
self.errors[:Sectors] << "Too much" end end It correctly stops my object from saving when it should. But instead of showing the error messages on the form itself. It just raises a ActiveRecord::RecordInvalid error. Saying that the the validation failed and that the object is invalid. That's perfect, the validation is supposed to fail. But why isn't it returning to my object edit page and showing the error with the message I provided? Any help is appreciated