v2.7.0-beta.5
danielspaniel
released this
23 Jun 20:45
·
722 commits
to master
since this release
- Fixed using FactoryGuy.hasMany with splat arguments not working in factory definitions
import FactoryGuy from 'ember-data-factory-guy';
FactoryGuy.define('user', {
traits: {
withProjects: {
// The typical hasMany usage is: FactoryGuy.hasMany('project', 3, 'big')
// But that does not allow you to make different types of project.
// They will all be similar except for id
// This is splat style arguments where each arg is and option for a different project
// It's the same style you can use for makeList and buildList
projects: FactoryGuy.hasMany('project', 'big', 'medium', 'small')
// makes 3 project that are all different
}
});