discourse/discourse — pull request #106 by gammons (2013-02-10 18:59:01+00:00)
Title: Refactored TopicsController#show into something that is much more maintainable (still a WIP though)

Hi Discourse team,

I refactored `TopicsController#show` into something that is much more maintainable and readable. All the specs pass, however, there is still a problem. Locally, when I try to view a topic, it does not show the topic! I just get a blank page, essentially. I am a bit confused about the whole thing, and I have very little knowledge of Ember.js. So I was hoping I could get one of your eyeballs on it to see what I did to make the posts not show up.

Also, a lot of the specs for `TopicController` were specifically exercising things that happened in the `TopicView` class. I have not refactored those controller specs (and indeed they do pass), but they should be dealt with as well, as I have significantly decreased the coupling between `TopicController` and `TopicView`.

I have also started a blog post about my endeavor, [which is here.](http://grantammons.me/2013/02/09/making-some-discourse-code-a-little-better/)

I still have to edit it and write a conclusion though, but I have not concluded the work just yet, as posts do not show when clicking on a topic!

Thanks in advance.