mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix contributing guide to reflect preferred position on indentation
Fix incorrect recommendation from indenting after private/protected to not. Based on opinions of @spastorino, @jonleighton, @tenderlove https://github.com/rails/rails/pull/1838#issuecomment-1440281 https://en.twitter.com/#!/spastorino/status/142054749351575552 https://en.twitter.com/#!/tenderlove/status/142014046445641728 https://en.twitter.com/#!/jonleighton/status/142021813415841794
This commit is contained in:
parent
522c0fdb55
commit
51ccb7f59c
1 changed files with 1 additions and 1 deletions
|
@ -309,7 +309,7 @@ Rails follows a simple set of coding style conventions.
|
||||||
|
|
||||||
* Two spaces, no tabs.
|
* Two spaces, no tabs.
|
||||||
* No trailing whitespace. Blank lines should not have any space.
|
* No trailing whitespace. Blank lines should not have any space.
|
||||||
* Indent after private/protected.
|
* Do not indent after private/protected. Private/protected should have the same indentation as the methods around.
|
||||||
* Prefer +&&+/+||+ over +and+/+or+.
|
* Prefer +&&+/+||+ over +and+/+or+.
|
||||||
* Prefer class << self block over self.method for class methods.
|
* 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+.
|
* +MyClass.my_method(my_arg)+ not +my_method( my_arg )+ or +my_method my_arg+.
|
||||||
|
|
Loading…
Reference in a new issue