3 ms·
Is this an ActiveRecord thing? We use FactoryGirl and DataMapper at our site and we can just use the build hooks all over. When DataMapper saves an object it sa
by CGamesPlay 12y ago
Is this an ActiveRecord thing? We use FactoryGirl and DataMapper at our site and we can just use the build hooks all over. When DataMapper saves an object it saves the entire tree, which means that when FactoryGirl creates the object the process looks like this:
1. Instantiate a new, unsaved User
2. Instantiate a new, unsaved Weapon and assign to the User
3. Save the user
4. Save cascades and saves the Weapon