# Watching Categories based on on group in discourse

**URL:** <https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488>\
**Category:** Development\
**Created:** [Março 23, 2016, 6:37pm UTC](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488 "2016-03-23T18:37:39Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [Abril 11, 2016, 6:43pm UTC](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488/22 "2016-04-11T18:43:02Z")

</div>

Because you switched to a different method

```plaintext
Category.find_by(slug: "site-feedback")

```

Does not equal

```plaintext
Category.find_by_slug("site-feedback")

```

Note how in the [file](https://github.com/discourse/discourse/blob/be3a5a56ccc284b352aa65080fc6b955f73cc72a/app/models/category.rb) there is no method defined `find_by`, there is `find_by_slug` and `find_by_email`.

That is because `find_by` is built into ActiveRecord, and you are querying the category table for any record containing `slug = 'whatever value you asked for'`, which is inherently different than using the method that exists in the category.rb file.

---

_[View the full topic](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488)._
