mbleigh/seed-fu — pull request #80 by GUI (2014-09-03 01:10:40+00:00)
Title: Mongoid compatibility

I'm not entirely sure if you're interested in this, or if this even belongs in seed-fu, but I thought I'd submit this pull request to get feedback.

This adds support for seeding Mongoid models with seed-fu. Mongoid models act a lot like ActiveRecord models, so there wasn't a terrible amount that had to change. A few things had to be wrapped in conditionals based on the model class type, but otherwise the core logic worked fine under Mongoid. All tests pass against Mongoid and continue to pass against ActiveRecord.

Is this something you'd be interested in integrating into seed-fu proper, or do you think this functionality would be better suited for a separate mongoid-only gem?

For reference, there is an existing [seed-fu-mongoid](https://github.com/johnbintz/seed-fu-mongoid) project that looks to accomplish the same thing for mongoid only. However, I ran into a couple bugs with that project (seed constraints for anything other than `id` seem broken), so I decided to take a quick gander at integrating this functionality directly into seed-fu.