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

This commit is contained in:
Vijay Dev 2011-05-08 15:12:18 +05:30
parent e35ba99e4b
commit 197f3f07d6

@ -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