このコミットが含まれているのは:
+14
-4
@@ -68,15 +68,22 @@ service, representation, and spec.
|
||||
- Prefer precise, minimal changes.
|
||||
- Use single quotes unless interpolation or escaping makes double quotes better.
|
||||
- Do not put a space before Ruby method-call parentheses.
|
||||
- Never put a line break immediately before `)` in Ruby.
|
||||
- Do not use `%w` or `%i` in new Ruby code.
|
||||
- Never write a Ruby line longer than 99 characters.
|
||||
- Aim to keep Ruby lines within 79 characters where practical.
|
||||
- For small Ruby method definitions that take keyword arguments, match the
|
||||
local no-parentheses style when nearby code uses it.
|
||||
- For multi-line Ruby hashes and keyword constructors, prefer a readable
|
||||
vertical shape with the opening brace on its own line.
|
||||
- Put one logical field per line when the expression would otherwise
|
||||
become dense.
|
||||
- Treat Ruby hash `{ ... }` style and Ruby block `{ ... }` style as separate
|
||||
rules.
|
||||
- Do not format Ruby hashes like Ruby blocks.
|
||||
- For Ruby hashes, keep the closing `}` on the same line as the final pair.
|
||||
- Keep the first pair on the same line as `{` by default.
|
||||
- If the hash would exceed the line limit, break after `{` and indent pairs
|
||||
by 4 spaces.
|
||||
- Put one logical pair per line when the expression would otherwise become
|
||||
dense.
|
||||
- For Ruby blocks, use 2-space indentation for the block body.
|
||||
- Keep comments short and useful; avoid narrating obvious code.
|
||||
- Do not add production dependencies without approval.
|
||||
|
||||
@@ -186,6 +193,9 @@ service, representation, and spec.
|
||||
|
||||
- When a controller action serializes nested associations, preload the
|
||||
associations it will touch instead of allowing N+1 queries.
|
||||
- Be sensitive to N+1 queries in all backend work.
|
||||
- Avoid introducing N+1 queries, and proactively fix existing N+1 issues when
|
||||
you find them in the code path you are editing.
|
||||
- When an association may already be preloaded, prefer loaded-association
|
||||
checks that reuse the preloaded data without losing the efficient database
|
||||
path.
|
||||
|
||||
新しい課題から参照
ユーザをブロックする