Auto-Exclude Parent Resource Includes to Prevent Bullet False Positives #4261
Paul-Bob
started this conversation in
Feature requests
Replies: 1 comment
-
|
During today’s meeting (18/02/2026), we realized that there may be situations where auto-exclusion is not desired. For example, if a user is using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A common example in our dummy app is
Course, which has manyLinks.The
Linksindex table also shows the course that each link belongs to. For that reason, adding:coursetoself.includeson the Links resource is necessary.However, when rendering a course show page, the has-many Links field renders the Links resource similarly to how it is rendered on the index page, but scoped to that course and with a few minor differences. One of those differences is that the parent course column is not rendered, since we are already on that course’s show view and it’s not necessary to display the course column again.
This makes the
:courseinclude unused in that context, but it is not recommended to remove it since it is required on the Links index page.When using the
bulletgem with logs enabled, it is impossible to get rid of all warnings. If we remove the include, we get aUSEwarning on the Links index. If we add the include, we get anAVOIDwarning when rendering the course show page and when the links from there are loaded.Avo has mechanisms to detect this scenario and automatically exclude the parent record’s model from the includes array.
Beta Was this translation helpful? Give feedback.
All reactions