From 6a3e2c3dd232a5175565aa62df7b2c2ee79654d3 Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 4 Mar 2024 10:08:34 +1100 Subject: [PATCH] Add note about query services (https://github.com/openfoodfoundation/openfoodnetwork/pull/12203) --- Code-Conventions.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Code-Conventions.md b/Code-Conventions.md index 8304b8d..cd1d9d9 100644 --- a/Code-Conventions.md +++ b/Code-Conventions.md @@ -2,6 +2,13 @@ Firstly, code conventions are enforced by Rubocop, in order to improve code cons This pages lists additional conventions that are not verified by Rubocop, but we agree to follow. +# Ruby/Rails + +Use existing code convention patterns where appropriate. Including: + +## Queries +Please adhere to the naming convention when introducing new query-related services in the `app/queries` folder. This consistency will streamline code readability and maintain a clear understanding of the purpose of each service. + # Database Migrations See this guide: [[Database-migrations]] @@ -80,4 +87,4 @@ TODO: how to avoid this ##### Example 1 Using has_many declarations in serializers is one of the most common causes of N+1 queries in code. -TODO: how to avoid this \ No newline at end of file +TODO: how to avoid this