# 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:** 1

<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 4, 2017, 9:42am UTC](https://meta.discourse.org/t/send-paramaters-function-computed/65568/1 "2017-07-04T09:42:16Z")

</div>

Hi,  
I have a problem with a function in ES6. I have made a @computed function who calls a function in the ruby Tag component. It works fine.  
But i need to send a parameter from my ES6 function to the component… and i can’t do it…  
My ES6 function :

```javascript
@computed('site.tags_by_category') // here i think i have to send my parameter (category)
  tagsCategorie(reponse) {
        return reponse;
  },

```

My ruby function :

```ruby
def self.tags_by_category(category: nil)
      tags = exec_sql("SELECT t.name, t.topic_count FROM tags t, topic_tags tt, topics top WHERE t.topic_count>0 AND t.id=tt.tag_id AND tt.topic_id=top.id AND top.category_id IN 
      (SELECT id FROM categories WHERE id=? OR parent_category_id=?)", category, category)
  end

```

I want to send my category from ecmascript to my ruby function… Or if it’s possible to know the category ID in the ruby Tag component, it can be another solution…  
If someone can help me…  
Ty, and sorry for my english.

---

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