# Send paramaters function @computed

**URL:** <https://meta.discourse.org/t/send-paramaters-function-computed/65568>\
**Category:** Development\
**Created:** [July 4, 2017, 9:42am UTC](https://meta.discourse.org/t/send-paramaters-function-computed/65568 "2017-07-04T09:42:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Yohan](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@Yohan](https://meta.discourse.org/u/Yohan)\
**Post date:** [July 5, 2017, 10:01am UTC](https://meta.discourse.org/t/send-paramaters-function-computed/65568/4 "2017-07-05T10:01:00Z")

</div>

I have tried to used a top\_tags copy. So i can get the tags of my current category, it’s great… but i don’t have the tags count… How modify the top\_tags in order to have the tags count?

def self.top\_tags2(limit\_arg: nil, category: nil, guardian: nil)  
limit = limit\_arg || SiteSetting.max\_tags\_in\_filter\_list  
scope\_category\_ids = (guardian||Guardian.new).allowed\_category\_ids

```
if category
  scope_category_ids &= ([category.id] + category.subcategories.pluck(:id))
end

tags = DiscourseTagging.filter_allowed_tags(
  tags_by_count_query(limit: limit).where("topics.category_id in (?)", scope_category_ids),
  nil, # Don't pass guardian. You might not be able to use some tags, but should still be able to see where they've been used.
  category: category
)

tags.count(COUNT_ARG).map {|name, _| name}

```

end

The last lane only return the tags name, not the count… but i need to have the count to make the tags cloud…

---

_[View the full topic](https://meta.discourse.org/t/send-paramaters-function-computed/65568)._
