mebwnq
Last Updated: February 25, 2016
·
306
· artchang
Photo sep 26  14 31 57

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.

Say Thanks
Respond