-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix N+1 issues in form_controller#show #5945
Conversation
…tifications factorybots
@@ -49,18 +49,21 @@ def update | |||
private | |||
|
|||
def set_case_contact | |||
@case_contact = CaseContact.find(params[:case_contact_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not this PR) someday we should add some palicy_scope
to this 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
We could add more tests for number of db queries using a library someday, but we don't have it yet |
What github issue is this PR for, if any?
Resolves #5893
What changed, and why?
Fixes the N+1 issues for the FormController#show that "bullet" complained about. Does this by preloading any record associations that are used later on.
How is this tested? (please write tests!) 💖💪
Screenshots please :)
Before:
After:
Feelings gif (optional)