查询所有者不是 current_user 的正确语法是什么:
.where(owner_id: != current_user.id, recipient_id: current_user.id, owner_type: "User")
我试过这个:
where(['current_user.id <> ?', :owner_id ], recipient_id: current_user.id, owner_type: "User")
得到:
undefined method `%' for ["current_user.id <> ?", :owner_id]:Array