From 1f773a8ef5a1f76166d0455c6a5e473278885c17 Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Mon, 18 Sep 2017 17:07:38 +0200 Subject: Support custom attributes on groups --- app/finders/groups_finder.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/finders/groups_finder.rb') diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb index 0c4c4b10fb6..0282b378d88 100644 --- a/app/finders/groups_finder.rb +++ b/app/finders/groups_finder.rb @@ -15,6 +15,8 @@ # Anonymous users will never return any `owned` groups. They will return all # public groups instead, even if `all_available` is set to false. class GroupsFinder < UnionFinder + include CustomAttributesFilter + def initialize(current_user = nil, params = {}) @current_user = current_user @params = params @@ -22,8 +24,12 @@ class GroupsFinder < UnionFinder def execute items = all_groups.map do |item| - by_parent(item) + item = by_parent(item) + item = by_custom_attributes(item) + + item end + find_union(items, Group).with_route.order_id_desc end -- cgit v1.2.3