
[英]Why can't you pass a variable containing an array of "row objects" to the .excluding/.where.not method in Rails?
我目前正在学习 ActiveRecord 并在 RSpec 中进行一些测试练习。 下面是一个让我失望的测试的缩写版本。 我可以通过将results变量更改为results = Row.where.not(id: rows_not_included)通过,但我不明白为什么你不能将保存行对象的变量传递 ...