diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-19 13:11:09 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 22:49:41 +0200 |
commit | 22aa034427b9392b44d9ecba0a51bb1b6c6616d7 (patch) | |
tree | 674a46d4ea73af07ccc3b7f5dd56168d4c5c1997 /app/serializers | |
parent | fb7a0f8c335631e1cb8c8f91e135e49528fad70e (diff) | |
download | gitlab-ce-22aa034427b9392b44d9ecba0a51bb1b6c6616d7.tar.gz |
Rename `GroupHierarchy` to `GroupDescendant`
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/group_child_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/group_child_serializer.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/serializers/group_child_entity.rb b/app/serializers/group_child_entity.rb index 6c795da8f88..8a2624c3d32 100644 --- a/app/serializers/group_child_entity.rb +++ b/app/serializers/group_child_entity.rb @@ -55,8 +55,8 @@ class GroupChildEntity < Grape::Entity unless: lambda { |_instance, _options| project? } def children_finder - @children_finder ||= GroupChildrenFinder.new(current_user: request.current_user, - parent_group: object) + @children_finder ||= GroupDescendantsFinder.new(current_user: request.current_user, + parent_group: object) end def children_count diff --git a/app/serializers/group_child_serializer.rb b/app/serializers/group_child_serializer.rb index fb47bf0b4eb..1b6b2ad6e08 100644 --- a/app/serializers/group_child_serializer.rb +++ b/app/serializers/group_child_serializer.rb @@ -24,10 +24,10 @@ class GroupChildSerializer < BaseSerializer protected def represent_hierarchies(children, opts) - if children.is_a?(GroupHierarchy) + if children.is_a?(GroupDescendant) represent_hierarchy(children.hierarchy(hierarchy_root), opts).first else - hierarchies = Array.wrap(GroupHierarchy.merge_hierarchies(children, hierarchy_root)) + hierarchies = Array.wrap(GroupDescendant.merge_hierarchies(children, hierarchy_root)) hierarchies.map { |hierarchy| represent_hierarchy(hierarchy, opts) }.flatten end end |