I’m not totally clear on what you are trying to achieve, but I think you are looking for GroupUser. You can get a list of group_ids and their owners’ user_ids using something like:
GroupUser.where(owner: true).pluck("group_id", "user_id")
I’m not totally clear on what you are trying to achieve, but I think you are looking for GroupUser. You can get a list of group_ids and their owners’ user_ids using something like:
GroupUser.where(owner: true).pluck("group_id", "user_id")