我正在尝试使用Squeel来比较连接表之间的属性,并进行一些数学运算。
以下是查询的一个示例:
Parent.joins{[child1, child2.grandchildren]}.
where{grandchildren.birth_datetime > Time.now - child1.age.years}我从Squeel得到一个错误,说"TypeError:不能将Squeel::Nodes::KeyPath转换成一个精确的数字“
有人知道我哪里做错了吗?
发布于 2012-11-27 16:22:02
有吗?
Parent.
joins{[child1, child2.grandchildren]}.
where{child2.grandchildren.birth_datetime > (Time.current - child1.age.years)}做这个把戏?
https://stackoverflow.com/questions/13177615
复制相似问题