我试图通过一组 id 进行选择,但前提是该shown
列为真。我试过了:
Product.find(@product_ids, conditions: "shown = true")
但是,这给了我错误:Couldn't find all Products with IDs (2, 3) [WHERE (shown = true)] (found 0 results, but was looking for 2)
在这种特殊情况下,选择的两个产品都shown
设置为 false。
我试图通过一组 id 进行选择,但前提是该shown
列为真。我试过了:
Product.find(@product_ids, conditions: "shown = true")
但是,这给了我错误:Couldn't find all Products with IDs (2, 3) [WHERE (shown = true)] (found 0 results, but was looking for 2)
在这种特殊情况下,选择的两个产品都shown
设置为 false。