discourse/discourse — pull request #1983 by bhicks (2014-02-20 18:53:17+00:00)
Title: Use extract method to clean up TopicQuery#default_results

TopicQuery#default_results is a fairly long and complex method, with multiple conditionals (https://codeclimate.com/github/discourse/discourse/TopicQuery).

This change uses extract method to remove conditionals from result_method, and combine similar conditions.