A good set of validations would spare you the need of investigating a hidden bug that causes ambiguous error messages or sends malformed data to a third party. ActiveSupport::Concern helped me solve this issue with ActiveModel::Validation. I wanted to find a generic super validator that you only need to implement once, and by including it to the validation-needed class, you would get all validations for free. The idea was simple; the only thing I had to overcome was finding out which attribute was defined for a specific class, which turned out to be kind of a tough problem.
Companies Mentioned
Eti Dahan Noked
@eti
Engineering Manager, Software Engineer, Tech Enthusiastic, Blog writer, Mom, Superhero