docbrown/app
Daniel Uber f90459d163
Include badge before serializing (#16160)
We are loading the badge for each included tag in the
Search::TagSerializer and seeing warnings from bullet

```
Bullet::Notification::UnoptimizedQueryError:

GET /search/tags?name=ta
USE eager loading detected
  Tag => [:badge]
  Add to your query: .includes([:badge])

Call stack
  /home/travis/build/forem/forem/app/serializers/search/tag_serializer.rb:5:in `block in <class:TagSerializer>'
  /home/travis/build/forem/forem/app/services/search/tag.rb:11:in `serialize'
  /home/travis/build/forem/forem/app/services/search/tag.rb:7:in `search_documents'
  /home/travis/build/forem/forem/app/controllers/search_controller.rb:54:in `tags'
  /home/travis/build/forem/forem/app/lib/middlewares/set_time_zone.rb:10:in `call'
```

Follow the advice, now when multiple tags are in the result set,
having multiple badges, badges are loaded only once (at query time)
and not one by one (at serialization time).
2022-01-17 17:12:52 -06:00
..
assets Adding documentation and constant (#16140) 2022-01-17 17:21:28 -05:00
black_box Make Rubocop happy again (#14729) 2021-09-14 09:15:01 -05:00
components/admin/users Small change to make the tools section of member details mobile friendly. (#15159) 2021-10-22 18:47:20 +02:00
controllers Adding documentation and constant (#16140) 2022-01-17 17:21:28 -05:00
decorators Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
errors small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
forms Using a Form Object that will persist for the Creator Settings Form (#15684) 2021-12-10 17:07:40 +02:00
helpers Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
javascript Creator Onboarding Logo Updates for launch [Will be merged and Deployed 17 January] (#16103) 2022-01-17 16:46:06 +02:00
lib Login with Google (#15986) 2022-01-13 10:25:52 -06:00
liquid_tags Fixing regex warning and removing unneeded groups (#16119) 2022-01-17 08:47:54 -05:00
mailers ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
models Addressing rubocop violations (#16156) 2022-01-17 17:21:06 -05:00
policies Allow for skipping navigation link creation (#16112) 2022-01-17 17:22:24 -05:00
queries small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Extracting container for allowed tags & attrs (#15338) 2021-12-16 12:24:45 -05:00
serializers Refactoring to add helper method (#16064) 2022-01-12 11:21:44 -05:00
services Include badge before serializing (#16160) 2022-01-17 17:12:52 -06:00
uploaders small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
validators Bump rubocop from 1.23.0 to 1.24.0 (#15872) 2021-12-27 10:04:59 -05:00
view_objects Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
views Creator Onboarding Logo Updates for launch [Will be merged and Deployed 17 January] (#16103) 2022-01-17 16:46:06 +02:00
workers Restoring tracking of custom impressions without GA (#16142) 2022-01-17 16:57:03 -05:00