discourse/discourse — pull request #1920 by nickborromeo (2014-02-08 22:16:30+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.

Please enter the commit message for your changes. Lines starting