Commit b28237b4 authored by Sean McGivern's avatar Sean McGivern Committed by Alfredo Sumaran

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.
parent 6aea7666
- if @issues.any?
- if @issues.reorder('').any?
- @issues.group_by(&:project).each do |group|
.panel.panel-default.panel-small
- project = group[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment