Scoping @mentions to only users in account
Sorry team, sorted it, adding my solution in the mentions controller below if others need it...
def index
@scoped_user = User.includes(:account_users).where(:account_users => {account_id: ActsAsTenant.current_tenant.id})
@users = @scoped_user.search_by_full_name(params[:query]).with_attached_avatar
respond_to do |format|
format.json
end
end
Notifications
You’re not receiving notifications from this thread.