Sails.js context loader. This module preload data like current record, list count ... etc for use in others policies, controllers and views as req.context
Want to help? see: https://gist.github.com/albertosouza/81bfb2bea761b7b6f5fe
Link: https://gist.github.com/albertosouza/81bfb2bea761b7b6f5fe
npm install sails-context --save
Add it to your policies:
// file config/policies.js
var context = require('sails-context').sails.police;
module.exports.policies = {
'*': [context]
};
Alberto Souza and contributors