agoragames/factory-worker — pull request #5 by ranweiler (2013-04-11 14:26:07+00:00)
Title: Allow inheritance from already-defined models in Factory.create

These changes allow the user to inherit from an already-defined model in calls to Factory.create. The `model` parameter can now be a string whose value corresponds to the `key` of a previously-defined model, which will act as the parent. An error is thrown in case the referenced parent model has not been defined.

A usage example can be seen in the 'inherits from already-defined models by name' spec. See: https://github.com/ranweiler/factory-worker/blob/master/spec/factory_spec.js#L31