Finding all groups of the poster in a topic

The second solution is exactly what I’m looking for, but I can’t get it to work. For some reason the available_flairs array doesn’t show up at all. Am I right assuming the code should go to the plugins.rb?