I'm trying to use Squeel to compare attributes among the joined tables along with a little math.
Here's an example of the query:
Parent.joins{[child1, child2.grandchildren]}.
where{grandchildren.birth_datetime > Time.now - child1.age.years}
I get an error from Squeel saying "TypeError: can't convert Squeel::Nodes::KeyPath into an exact number"
Anyone know what I'm doing wrong here?