# Making user search scoped to a group

**URL:** <https://meta.discourse.org/t/making-user-search-scoped-to-a-group/34058>\
**Category:** Feature\
**Created:** [2015 年10 月 2 日 16:50 UTC](https://meta.discourse.org/t/making-user-search-scoped-to-a-group/34058 "2015-10-02T16:50:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![jvillasante](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jvillasante/32/116828_2.png) [@jvillasante](https://meta.discourse.org/u/jvillasante)\
发布日期： [2015 年10 月 2 日 16:50 UTC](https://meta.discourse.org/t/making-user-search-scoped-to-a-group/34058/1 "2015-10-02T16:50:43Z")

</div>

I’m trying to find a way that user mentions be scoped to only the group that the user mentioning is. I mean, I would like that when some user try to mention another, the choices she get for those others are scoped to his own group.

I thinking about patching app/models/user\_search.rb but since I’m new to rails i’m wondering how can I scope the user search to the group of the current user.

Any help will be much appreciated.  
Thanks!

---

_[View the full topic](https://meta.discourse.org/t/making-user-search-scoped-to-a-group/34058)._
