Skip to content

Commit 31acae9

Browse files
Merge pull request #2065 from biggianteye/fix-sponsor-chapter-filter
Fix showing duplicate sponsors
2 parents c5bbc18 + a7ccf67 commit 31acae9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/models/sponsors_search.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def by_name
2626
end
2727

2828
def by_chapter
29-
@sponsors = sponsors.joins(:workshops).where('workshops.chapter_id' => chapter) if chapter.present?
29+
if chapter.present?
30+
@sponsors = sponsors.joins(:workshops).where('workshops.chapter_id' => chapter).group('sponsors.id')
31+
end
3032
end
3133
end

0 commit comments

Comments
 (0)