Don't try to count a relation with aliases
Work around ActiveRecord count and column aliases issue as described at: <https://github.com/rails/rails/issues/15138#issuecomment-61325080> AR doesn't promise that `#count` (which is called by `#any?`) will work for relations using `#select`, which means we need a workaround instead.
Showing
Please register or sign in to comment