From 5551ccd7201ea6b45a2e2721502ba55e8f525d8f Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Wed, 2 Mar 2016 19:13:50 -0300 Subject: Code improvements --- app/finders/groups_finder.rb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'app/finders') diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb index a3a8cd541de..ce62f5e762f 100644 --- a/app/finders/groups_finder.rb +++ b/app/finders/groups_finder.rb @@ -1,6 +1,5 @@ class GroupsFinder def execute(current_user = nil) - segments = all_groups(current_user) if segments.length > 1 @@ -15,17 +14,9 @@ class GroupsFinder def all_groups(current_user) if current_user - [current_user.authorized_groups, public_and_internal_groups] + [current_user.authorized_groups, Group.unscoped.public_and_internal_only] else - [Group.public_only] + [Group.unscoped.public_only] end end - - def public_groups - Group.unscoped.public_only - end - - def public_and_internal_groups - Group.unscoped.public_and_internal_only - end end -- cgit v1.2.1