Trying to sort gem versions by downloads fails because joins don’t work on associations with dynamic conditions.
https://github.com/rubygems/rubygems.org/blob/master/app/models/version.rb#L6 …
-
-
Replying to @olivierlacan
If anybody has a brilliant idea for that one, I’m fresh out.
1 reply 0 retweets 0 likes -
Replying to @olivierlacan
Why does that need to be a block? Isn't that just `foreign_key: :rubygem_id`?
2 replies 0 retweets 0 likes -
Replying to @sgrif @olivierlacan
Versions belong to only one gem, so there should not be a need to specify both
1 reply 0 retweets 0 likes -
Replying to @sgrif
That’s what I assumed too. See https://github.com/rubygems/rubygems.org/commit/66765d45a4472fb458bf9fa47a83f092941a5016#commitcomment-19480753 … for context. It needs to join on both version_id and rubygem_id.
2 replies 0 retweets 0 likes
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.