I have a table with a couple of boolean columns.
A PurchaseOrder needs to be marked as complete (first boolean), before it is invoiced (the second boolean).
I’d appreciate some pointers as to how to validate legal combinations of these booleans.
What I have in mind is something like,
:validates (!:complete and !:invoiced) or (:complete && :invoiced) or (:complete && !:invoiced)
Is this possible?
Use a custom validator