mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 02:47:15 +08:00
![Alan Guo Xiang Tan](/assets/img/avatar_default.png)
Not eager loading was resulting in the N+1 queries problem when serializing with the `CurrentUserSerializer` as `CurrentUserSerializer#sidebar_sections` serializes the sections with `SidebarSectionSerializer` which fetches all the `SidebarUrl` records for each `SidebarSection` record.
8 lines
107 B
Ruby
8 lines
107 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:sidebar_url) do
|
|
icon "link"
|
|
name "tags"
|
|
value "/tags"
|
|
end
|