Add option to validate on save #39

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

codez commented May 8, 2012

Currently, seeded models are not validated. As we use seeds for production as well, we prefer some validation overhead over potentially invalid data. Because of this, we implemented an option to validate the models on save and two new helper methods:

User.seed!(...) and User.seed_once!(...)

With these methods, an exception is thrown if validation fails. The rest of the API is completely backwards compatible.

is this going to get pulled in? Could really use this feature in the main gem.

geo1004 commented Jun 15, 2015

Should be good to have this option in the gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment