Comparing version 0.9.1 to 0.9.2
@@ -133,3 +133,3 @@ module.exports = function(sails) { | ||
dependencies: { | ||
sails: sails.version, | ||
sails : sails.version, | ||
grunt : '0.4.1', | ||
@@ -136,0 +136,0 @@ 'sails-disk' : '~0.9.0', |
@@ -92,4 +92,4 @@ module.exports = function(sails) { | ||
var controllerActions = sails.middleware.controllers[controllerId]; | ||
_.each(controllerActions, function (_a, actionId) { | ||
var controllerActions = _.functions(sails.controllers[controllerId]); | ||
_.each(controllerActions, function (actionId) { | ||
@@ -135,8 +135,2 @@ | ||
// Mix in middleware from blueprints | ||
self.middleware[controllerId].find = Controller.find; | ||
self.middleware[controllerId].create = Controller.create; | ||
self.middleware[controllerId].update = Controller.update; | ||
self.middleware[controllerId].destroy = Controller.destroy; | ||
// TODO: support blueprint config on a per-controller basis | ||
@@ -212,2 +206,9 @@ if (!util.isDictionary(controller)) { | ||
// Mix in middleware from blueprints | ||
self.middleware[controllerId].find = Controller.find; | ||
self.middleware[controllerId].create = Controller.create; | ||
self.middleware[controllerId].update = Controller.update; | ||
self.middleware[controllerId].destroy = Controller.destroy; | ||
// Mix in middleware from user controller | ||
@@ -214,0 +215,0 @@ _.each(controller, function(action, actionId) { |
@@ -85,3 +85,4 @@ module.exports = function(sails) { | ||
sails.log.verbose('Binding policies to controllers...', this.mapping); | ||
sails.log.verbose('Binding policies :: \n', this.mapping, | ||
'\nto controllers :: \n', sails.middleware.controllers); | ||
@@ -88,0 +89,0 @@ // Policies can be bound to: |
@@ -201,3 +201,3 @@ var _ = require('lodash'), | ||
exports.isDictionary = function isDictionary(thing) { | ||
return _.isObject(thing) && !_.isArray(thing); | ||
return _.isObject(thing) && !_.isArray(thing) && !_.isFunction(thing); | ||
}; | ||
@@ -204,0 +204,0 @@ |
{ | ||
"name": "sails", | ||
"author": "Mike McNeil <mike@balderdash.co>", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "API-driven framework for building realtime apps, using MVC conventions (based on Express and Socket.io)", | ||
@@ -6,0 +6,0 @@ "homepage": "http://sailsjs.com", |
11326537
14693