Topic Ratings Plugin

@fackelwind Thanks for the feedback! I appreciate it. This precipitated a significant refactor to get it working as expected. In retrospect I’m surprised it worked before at all…

https://github.com/angusmcleod/discourse-ratings/commit/2b766fae0e730f63d83a3c7c42c51fa7c0df8827

https://github.com/angusmcleod/discourse-ratings/commit/94ad34bc8423db0e592dd596e806a8357178c0e5

The only thing that doesn’t work now is the topic average will not get automatically updated for other users when a new user publishes a post with a rating or edits a rating in a post. Other users will see the updated rating on the new or updated post itself, but the topic average rating won’t update until those other users refresh. I will fix that soon.

Here’s a screencast demonstrating the functionality: http://quick.as/b1wbSOa9g

@zogstrip @riking Hey guys, could you give me some advice on the best way to push topic updates to other clients from the server? I’m pushing the post updates using the aptly named post method publish_change_to_clients which uses the MessageBus. But I’m not sure of the best way to do the same for the average_rating custom field I’ve created for topics. I can send it to back to the current user’s client easily enough, but other clients? I’m sure it’s relatively straight forward, but with my basic ruby skills the answer isn’t jumping out at me…

1 лайк