Mongoose - 如何在自定义类型上添加2dsphere索引?

时间:2015-10-20 15:10:45

标签: node.js mongodb mongoose geojson 2dsphere

我在Mongoose-geojson-schema使用了Mongoose但是我无法在我的字段中添加No route matches [POST] "/admin/user/5527984339613100031a0000"索引:

= form_tag admin_user_path, method: :post do
  = submit_tag 'Save'

出现此类错误:

2dsphere

1 个答案:

答案 0 :(得分:0)

我认为你不能以这种方式使用Mongoose-geojson-schema,它会混淆'类型'属性 - 试试这个:

$scope.showRequired = !($scope.chkCollection.one || $scope.chkCollection.two || $scope.chkCollection.three);
function showRequiredCheckbox(){ 
    return $scope.showRequired && !($scope.form.cb.one 
            || $scope.form.cb.two|| $scope.form.cb.three);
}