Last Updated: February 25, 2016
·
591
· artchang

validates_acceptance_of needs a string

Rails has some nice validations in their models. This specific one, validatesacceptanceof is dumb. It only validates if the attribute is set to "1". That's a string, not a boolean, not an integer.

This bit me so many times now, I can't believe it.