From 4308f0f3cda1458db5a0205d492fab889d67f5f2 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 17 Jan 2019 19:05:54 +0100 Subject: [PATCH] Hide other occurrences of the same user from appearing in wrong StudyGroup --- app/controllers/study_groups_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/study_groups_controller.rb b/app/controllers/study_groups_controller.rb index 9e92949e..54b4aa92 100644 --- a/app/controllers/study_groups_controller.rb +++ b/app/controllers/study_groups_controller.rb @@ -15,7 +15,7 @@ class StudyGroupsController < ApplicationController def edit @search = @study_group.users.search(params[:q]) - @members = StudyGroupMembership.where(user: @search.result) + @members = StudyGroupMembership.where(user: @search.result, study_group: @study_group) end def update