Could you move this method to the models/application.coffee file and make it an instance method?