From 768acc4166bdbf3b49570facdb1e13c3e34da805 Mon Sep 17 00:00:00 2001 From: Yasuhiro Yoshida <892791+YasuhiroYoshida@users.noreply.github.com> Date: Fri, 1 Oct 2021 15:22:00 +0300 Subject: [PATCH] Add scope to only allow visible enterprises in group --- app/helpers/injection_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/injection_helper.rb b/app/helpers/injection_helper.rb index cf2d268aa0..d9edfd87a4 100644 --- a/app/helpers/injection_helper.rb +++ b/app/helpers/injection_helper.rb @@ -62,7 +62,7 @@ module InjectionHelper def inject_group_enterprises inject_json_array( "enterprises", - @group.enterprises.activated.all, + @group.enterprises.activated.visible.all, Api::EnterpriseSerializer, enterprise_injection_data )