Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.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
Ruby on rails 使用acts_作为_列表,将范围设置为字符串列_Ruby On Rails_Ruby On Rails 4_Acts As List - Fatal编程技术网

Ruby on rails 使用acts_作为_列表,将范围设置为字符串列

Ruby on rails 使用acts_作为_列表,将范围设置为字符串列,ruby-on-rails,ruby-on-rails-4,acts-as-list,Ruby On Rails,Ruby On Rails 4,Acts As List,使用,我试图将范围设置为where列 acts_as_list scope: :where 其中是模型中字符串列的名称 但当我遇到这个错误时: 未定义的方法“where#id”表示#你的意思是什么?在哪里 这有点模糊,但需要使用数组作为值: 充当列表范围:[:其中] 文件中提到了这一点: 这有点模糊,但需要使用数组作为值: 充当列表范围:[:其中] 文件中提到了这一点: 这回答了你的问题吗?如果是,你能接受答案吗?这回答了你的问题吗?如果是,你能接受这个答案吗?

使用,我试图将范围设置为
where

acts_as_list scope: :where
其中
是模型中字符串列的名称

但当我遇到这个错误时:

未定义的方法“where#id”表示#你的意思是什么?在哪里


这有点模糊,但需要使用数组作为值:

充当列表范围:[:其中]

文件中提到了这一点:


这有点模糊,但需要使用数组作为值:

充当列表范围:[:其中]

文件中提到了这一点:


这回答了你的问题吗?如果是,你能接受答案吗?这回答了你的问题吗?如果是,你能接受这个答案吗?