Hide other occurrences of the same user from appearing in wrong StudyGroup

This commit is contained in:
Sebastian Serth
2019-01-17 19:05:54 +01:00
parent c498d2b08b
commit 4308f0f3cd

View File

@ -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