mbleigh/seed-fu — pull request #39 by codez (2012-05-08 08:26:43+00:00)
Title: Add option to validate on save

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.