# How to retrieve group owners? (Rails code question)

**URL:** https://meta.discourse.org/t/how-to-retrieve-group-owners-rails-code-question/153610
**Category:** Development
**Created:** [June 2, 2020, 7:17pm UTC](https://meta.discourse.org/t/how-to-retrieve-group-owners-rails-code-question/153610 "2020-06-02T19:17:29Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [June 3, 2020, 12:51am UTC](https://meta.discourse.org/t/how-to-retrieve-group-owners-rails-code-question/153610/3 "2020-06-03T00:51:40Z")

</div>

Thanks, this is definitely a step forward. My goal is to display the owners of a group under the group name on the group index page.

EDIT: For example, something like this:

```
<script type="text/x-handlebars" data-template-name="components/groups-info">
 {{#if showFullName}}
  <span class="groups-info-name">{{group.full_name}}</span>
  {{#each group.group_users as |gUser|}}
      {{#if gUser.owner}}
            <div>{{gUser.user.name}}</div>
      {{/if}}
  {{/each}}
{{else}}
  <span class="groups-info-name">{{group.displayName}}</span>
{{/if}}
</script>

```

This doesn’t quite work. What’s missing?

---

_[View the full topic](https://meta.discourse.org/t/how-to-retrieve-group-owners-rails-code-question/153610)._
