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

<div class="post-metadata">

**Author:** ![Jared\_Needell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jared_needell/32/116554_2.png) [@Jared\_Needell](https://meta.discourse.org/u/Jared_Needell)\
**Post date:** [Março 24, 2016, 12:59am UTC](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488/10 "2016-03-24T00:59:20Z")

</div>

So teaching myself rails tonight!

Breaking down the plugin I did some testing.

Category.find\_by\_slug(“site-feedback”) doesn’t seem to work, I get a nil return

but if I do

Category.find\_by(slug: “site-feedback”) appears to return data.

 ![](https://global.discourse-cdn.com/meta/original/3X/1/4/1417427d91fa0ee86f303d9244f49df92c5a2d51.png)

I made these changes on the plugin and appears to working..

Here’s my code, I’m going to be updating / tweaking it through the night to fit my site needs.

> <https://github.com/tekwreck/discourse-watch-category-mcneel/blob/master/plugin.rb>

---

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