Skip to content
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

提出物詳細画面で余分なクエリを削除しました #4175

Merged
merged 2 commits into from
Feb 9, 2022

Conversation

shibaaaa
Copy link
Contributor

@shibaaaa shibaaaa commented Feb 8, 2022

やったこと

提出物詳細画面でN+1の解消と、余分に発行されるクエリを削減しました。
修正したfind_footprintsメソッドとfootprint!メソッドはProductsController#showでのみ呼ばれるメソッドなので、直前にselectしている@productsを呼んでクエリを発行しないようにしています。

@shibaaaa
Copy link
Contributor Author

shibaaaa commented Feb 8, 2022

@komagata
お手隙の際にレビューお願いします:pray:

Copy link
Member

@komagata komagata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正ありがとうございます〜!

@komagata komagata merged commit 1a3b8c4 into fjordllc:main Feb 9, 2022
@github-actions github-actions bot mentioned this pull request Feb 9, 2022
54 tasks
@shibaaaa shibaaaa deleted the turning_products_show branch February 9, 2022 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants