discourse/discourse — pull request #876 by chrishunt (2013-05-22 03:58:43+00:00)
Title: Trigger UserActionObserver when updating TopicUser

This fixes #482. Thanks @ZogStriP for the troubleshooting.

The `after_save` callbacks are not triggered when calling `TopicUser.update_all` in [`TopicUser.change`](https://github.com/discourse/discourse/blob/d4360798013e754e770f136eade711ae5de93fd1/app/models/topic_user.rb#L78) and [`TopicUser.track_visit!`](https://github.com/discourse/discourse/blob/d4360798013e754e770f136eade711ae5de93fd1/app/models/topic_user.rb#L98)

This PR fixes that. Favorite counts are accurate on my machine after this fix.