mirror of
https://ghfast.top/https://github.com/discourse/discourse-follow.git
synced 2026-07-15 11:36:38 +08:00
The `/user-cards.json` route in core serializes multiple `User` objects using the `UserCardSerializer` which means that, in order to avoid N+1 queries, we need to preload all the associations of the `User` model that are needed for the serialization. However, the follow plugin adds a few attributes to the `UserCardSerializer` that depend on associations defined by the plugin, but there is no official API for extending [the set of preloaded associations](
|
||
|---|---|---|
| .. | ||
| follow_notifications_spec.rb | ||
| user_cards_route_spec.rb | ||
| user_destroyer_spec.rb | ||