balderdashy/sails — pull request #2465 by askmike (2014-12-05 15:34:50+00:00)
Title: pull apart actionUtil.populateEach to support reuse outside requests

Turns actionUtil.populateEach into 3 different functions that craves the way towards more reusable functions.

Our use case:

In certain specific scenarios [we want to publish actions](https://stackoverflow.com/questions/27254587/sails-publishupdate-system-does-not-propagate-to-associations) (publishUpdate et al.) to associated models (eg: User has Pets, when a pet changes, publish User update). We want to auto populate the associated models but where unable to use populateEach due its dependence on a `req` object.