Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Activerecord Rails 5中的嵌套表单出错_Activerecord_Ruby On Rails 5 - Fatal编程技术网

Activerecord Rails 5中的嵌套表单出错

Activerecord Rails 5中的嵌套表单出错,activerecord,ruby-on-rails-5,Activerecord,Ruby On Rails 5,我正在编写关于嵌套表单的Rails教程,但每当我尝试提交表单时,都会出现以下错误: 这个人必须存在 如果我从地址模型中删除了belown_to:person,代码就可以工作了 我在Rails 5上工作,本教程是针对一些早期版本的,但我非常希望它在Rails 5上工作。try属于:person,可选:truetry属于:person,可选:true

我正在编写关于嵌套表单的Rails教程,但每当我尝试提交表单时,都会出现以下错误:

这个人必须存在

如果我从地址模型中删除了belown_to:person,代码就可以工作了


我在Rails 5上工作,本教程是针对一些早期版本的,但我非常希望它在Rails 5上工作。

try
属于:person,可选:true

try
属于:person,可选:true