Here's what I am doing. In app/controllers/application.js I have the following:
var Application = function () {
// define
this.h = {
array: require('../helpers/array'),
encrypt : require('../helpers/encrypt'),
is: require('../helpers/is'),
random: require('../helpers/random'),
require: require('../helpers/require'),
save: require('../helpers/save'),
sort: require('../helpers/sort'),
to: require('../helpers/to'),
view: require('../helpers/view'),
welcome: require('../helpers/welcome')
}
and then in each controller I have this at the top:
var Notifications = function () {
// responds with
this.respondsWith = ['html', 'json', 'xml', 'js', 'txt'];
// shortcuts
var h = this.h;
That way I can access any function I need to in any controller by using h.helpername.fn
T