Tag Archives: validations

DRYing up your validations using DB reflection

Avoiding silent truncation of your model fields requires putting length validations on them. But this can introduce duplication of knowledge. In this post I demonstrate how to pull limit information directly from the DB into your model validations. Continue reading

Posted in Rails | Tagged , , , | 26 Comments