提交 197f3f07 编写于 作者: V Vijay Dev

Included more details on Rails coding conventions (from LH Source Style page)

上级 e35ba99e
......@@ -300,10 +300,16 @@ h4. Follow the Coding Conventions
Rails follows a simple set of coding style conventions.
* Two spaces, no tabs
* Prefer +&&+/+||+ over +and+/+or+
* +MyClass.my_method(my_arg)+ not +my_method( my_arg )+ or +my_method my_arg+
* Follow the conventions you see used in the source already
* Two spaces, no tabs.
* No trailing whitespace. Blank lines should not have any space.
* Indent after private/protected.
* Prefer +&&+/+||+ over +and+/+or+.
* Prefer class << self block over self.method for class methods.
* +MyClass.my_method(my_arg)+ not +my_method( my_arg )+ or +my_method my_arg+.
* a = b and not a=b.
* Follow the conventions you see used in the source already.
These are some guidelines and please use your best judgement in using them.
h4. Sanity Check
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册