diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-02 08:55:44 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 23:49:42 +0300 |
commit | af0b8e0558f529cd79a9dd061dc54ae3bfa9d1dd (patch) | |
tree | d43594a335fb21e6f140f4a5013e45de272ea8e7 /app/models/concerns/group_descendant.rb | |
parent | ab5d5b7ecea5d68c00171d0750b1b2f62ffbe55d (diff) |
Only preload ancestors for search results in the specified parent
When filtering we want all to preload all the ancestors upto the specified
parent group.
- root
- subgroup
- nested-group
- project
So when searching 'project', on the 'subgroup' page we want to preload
'nested-group' but not 'subgroup' or 'root'
Diffstat (limited to 'app/models/concerns/group_descendant.rb')
-rw-r--r-- | app/models/concerns/group_descendant.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/group_descendant.rb b/app/models/concerns/group_descendant.rb index f850f71d661..7bc555e11a6 100644 --- a/app/models/concerns/group_descendant.rb +++ b/app/models/concerns/group_descendant.rb @@ -14,7 +14,8 @@ module GroupDescendant if parent && parent != hierarchy_top expand_hierarchy_for_child(parent, { parent => hierarchy }, - hierarchy_top) + hierarchy_top, + preloaded) else hierarchy end |