diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-12 15:58:44 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 23:49:41 +0300 |
commit | 3e6dd7d88daaac2dbafc234753942086e0ba0403 (patch) | |
tree | e80888fc0580c78e71db4b0b57c4b088c9c64d0c /app/serializers | |
parent | 960559aa6889a0b5ac1d46b84b7f7977a57d50ca (diff) |
Use same response-body in groups-dashboard as we do for group-home
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/group_child_serializer.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/serializers/group_child_serializer.rb b/app/serializers/group_child_serializer.rb index 363f0c9b3d8..65dd1ced2a3 100644 --- a/app/serializers/group_child_serializer.rb +++ b/app/serializers/group_child_serializer.rb @@ -5,13 +5,14 @@ class GroupChildSerializer < BaseSerializer entity GroupChildEntity - def expand_hierarchy(hierarchy_root) + def expand_hierarchy(hierarchy_root = nil) @hierarchy_root = hierarchy_root + @expand_hierarchy = true self end def represent(resource, opts = {}, entity_class = nil) - if hierarchy_root.present? + if @expand_hierarchy represent_hierarchies(resource, opts) else super(resource, opts) |