shivpkumar/Solved-Button — pull request #1 by ZogStriP (2014-01-21 10:05:11+00:00)
Title: refactor example

Since the `correct_post_id` is an attribute of the topic, you should rerender the correct button whenever it changes instead of copying it to the post model.

NOTE: the code does not test if something went wrong server-side.

There are several ways to keep the UI up to date. In this PR I reopened the `PostView` and added a new `classNameBinding`. Another solution would be to have a `isCorrect` property on the `Post` model (that would check the id of the post against the correct_post_id of the topic) and update the post template accordingly.