paulelliott/fabrication — pull request #144 by Eleo (2013-01-07 17:17:29+00:00)
Title: Fix for versions of Mongoid prior to 2.3.0

Using an ancient version of Mongoid in a project I inherited, and upgrading isn't feasible yet.

`Mongoid::Document.initialize` prior to version 2.3.0 only accepts one argument, whereas Fabrication wants to send two; ArgumentError.

Seems to be the issue described here:
https://groups.google.com/d/topic/fabricationgem/YiBSNR1Qehk/discussion

I didn't know if it was better to check the version of Mongoid or rescue an ArgumentError, but the former seemed better. Either way, you get the idea. If there's a better approach, a patch like this would be appreciated.