Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to validate on save #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

codez
Copy link

@codez 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.

@DaveSanders
Copy link

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

@geo1004
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants