小编Nin*_*yes的帖子

如何使用meteor帐户和autoform添加/编辑用户

我正在构建Meteor管理系统的一部分,让管理员添加/编辑其他管理员.我正在使用Meteor Accounts和Autoform,但我无法弄清楚如何处理它以便用户通过Autoform进行验证并正确保存.从我发现它看起来我需要使用该Accounts.createUser方法并使表单成为一个type="method"或什么,但我不知道如何处理或如果这是正确的方式.

这是我现在的代码:

架构:

Schema = {};

Schema.UserProfile = new SimpleSchema({
    name: {
        type: String,
        label: "Name"
    }
});

Schema.User = new SimpleSchema({
    email: {
        type: String,
        regEx: SimpleSchema.RegEx.Email
    },
    password: {
      type: String,
      label: "Password",
      min: 6
    },
    passwordConfirmation: {
      type: String,
      min: 6,
      label: "Password Confirmation",
      custom: function() {
        if (this.value !== this.field('password').value) {
          return "passwordMissmatch";
        }
      }
    },
    createdAt: {
      type: Date,
      autoValue: function() {
        if (this.isInsert) {
          return new Date;
        } else …
Run Code Online (Sandbox Code Playgroud)

meteor iron-router meteor-accounts meteor-autoform

8
推荐指数
1
解决办法
2955
查看次数

如何设置dokku-persistent-storage的容量

我正在尝试使用dokku-persistent-storage,因此我的rails应用程序的上传保留在服务器上,但我不太明白如何构建路径,因为我是DokkuDocker的新手.(我在Digital Ocean上的Ubuntu Droplet上运行它)


我不确定它是否应该是这样的:

[SERVER IP ADDRESS]/home/dokku/myapp/public_folder
Run Code Online (Sandbox Code Playgroud)

要么

/home/dokku/myapp/public_folder
Run Code Online (Sandbox Code Playgroud)

或者,如果我走了,它应该是完全不同的东西.


这就是github部分所说的:

在您的应用程序文件夹(/ home/dokku/app_name)中,创建一个名为PERSISTENT_STORAGE的文件.

在此文件中列出要安装的每行的一个卷映射/卷.例如:

/host/path:/container/path
/another/container/path
Run Code Online (Sandbox Code Playgroud)

上面的示例将导致在部署和docker运行期间将以下参数传递给docker:

-v /host/path:/container/path -v /another/container/path
Run Code Online (Sandbox Code Playgroud)

可以在此处找到有关泊坞窗卷的信息:http://docs.docker.io/en/latest/use/working_with_volumes/

linux ubuntu ruby-on-rails docker digital-ocean

7
推荐指数
1
解决办法
1699
查看次数