discourse/discourse — pull request #1853 by nickborromeo (2014-01-22 18:39:38+00:00)
Title: Extract queries to keep logic in the Categories Model

This creates two methods in the Category model. This moves the model
logic to the model and just calls the Category class methods in
ListController.

This also adds tests for the two methods created in the Category
model. The motivation for this refactor is the code climate score of the
this class and readability of the code.