So, in ActiveRecord, trying to put a condition on the ON clause in eager_load, not on the whole query. Could drop to Arel, I suppose.
-
-
Replying to @coreyhaines
But seems like eager_load should support taking conditions?
1 reply 0 retweets 0 likes -
Replying to @coreyhaines
Or something at least. left outer joins when putting conditions on the whole query doesn't work. :(
1 reply 0 retweets 0 likes -
Replying to @coreyhaines
I need to add a condition on created_at to the ON clause :(
2 replies 0 retweets 0 likes -
Replying to @coreyhaines
I guess I'll just load up all the data into hashes and look them up when I need them. o_O
1 reply 0 retweets 0 likes -
Replying to @coreyhaines
Might take a quick stab to do it with Arel, since that would be my preferred way. Of course, I'm only looking for counts, so ....
3 replies 0 retweets 0 likes
Replying to @coreyhaines
Don't use Arel for this. Drop down to raw SQL if you need to
4:51 PM - 6 Jul 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.