提交 a1610f54 编写于 作者: C Carlos Antonio da Silva

Merge pull request #8849 from mattdbridges/contributing_to_rails

Adding mention about single-line blocks in Contributing to Rails [ci skip]
......@@ -216,6 +216,7 @@ Rails follows a simple set of coding style conventions:
* Use `MyClass.my_method(my_arg)` not `my_method( my_arg )` or `my_method my_arg`.
* Use `a = b` and not `a=b`.
* Use assert_not methods instead of refute.
* Prefer `method { do_stuff }` instead of `method{do_stuff}` for single-line blocks.
* Follow the conventions in the source you see used already.
The above are guidelines — please use your best judgment in using them.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册