Skip to content

Add option to validate on save - #39

Open
codez wants to merge 1 commit into
mbleigh:masterfrom
codez:master
Open

Add option to validate on save#39
codez wants to merge 1 commit into
mbleigh:masterfrom
codez:master

Conversation

@codez

@codez codez commented May 8, 2012

Copy link
Copy Markdown

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
Copy Markdown

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

@geo1004

geo1004 commented Jun 15, 2015

Copy link
Copy Markdown

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