You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
When rendering the content - each of the embedded blobs is individually loaded via the GlobalID::Locator - ignoring an preloaded values from with_rich_text_#{name}_and_embeds.
If the attachments are inside a gallery they seem to be loaded multiple time.
Failing test (requires some query assertions copied from ActiveRecord).
I think I misunderstood the purpose of this scope. The attachments in the content are not necessarily Blobs- but can be any kind thing that includes Attachable - so the scope to preload embeds isn't going to be sufficient.
Regardless - we should only be doing one query per kind of attachment type and not queuing multiple times for the same record.
It would also be good to be able to preload all of the records referenced within the content - but that doesn't seem to be possible with the current associations set up.
When rendering the content - each of the embedded blobs is individually loaded via the
GlobalID::Locator
- ignoring an preloaded values fromwith_rich_text_#{name}_and_embeds
.If the attachments are inside a gallery they seem to be loaded multiple time.
Failing test (requires some query assertions copied from ActiveRecord).
Code for this test is at https://github.com/lsylvester/actiontext/tree/unnecessary-queries-test but it is not ready for a PR.
The text was updated successfully, but these errors were encountered: