aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-07-09 09:38:03 -0700
committerXavier Noria <fxn@hashref.com>2012-07-09 09:38:03 -0700
commit45d78a3dd1a1b199d4d3a953d3cef01de47432f6 (patch)
treeb0fa93890525c81df91c011941d0f2ded62a707a
parent7adc4f20cc78f1150640bdc0a60832b3752244dc (diff)
parent904eacea31c7624b0bcec38ba6f7f45394e74a5c (diff)
downloadrails-45d78a3dd1a1b199d4d3a953d3cef01de47432f6.tar.gz
rails-45d78a3dd1a1b199d4d3a953d3cef01de47432f6.tar.bz2
rails-45d78a3dd1a1b199d4d3a953d3cef01de47432f6.zip
Merge pull request #7015 from sikachu/3-2-stable-code-style
Update coding convention from master
-rw-r--r--railties/guides/source/contributing_to_ruby_on_rails.textile16
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile
index f1f6c8f21b..505200c3c8 100644
--- a/railties/guides/source/contributing_to_ruby_on_rails.textile
+++ b/railties/guides/source/contributing_to_ruby_on_rails.textile
@@ -307,16 +307,16 @@ h4. Follow the Coding Conventions
Rails follows a simple set of coding style conventions.
-* Two spaces, no tabs.
-* No trailing whitespace. Blank lines should not have any space.
-* Do not indent after private/protected. Private/protected should have the same indentation as the methods around.
+* Two spaces, no tabs (for indentation).
+* No trailing whitespace. Blank lines should not have any spaces.
+* Indent after private/protected.
* Prefer +&amp;&amp;+/+||+ 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.
+* Prefer class << self over self.method for class methods.
+* Use +MyClass.my_method(my_arg)+ not +my_method( my_arg )+ or +my_method my_arg+.
+* Use a = b and not a=b.
+* Follow the conventions in the source you see used already.
-These are some guidelines and please use your best judgment in using them.
+The above are guidelines -- please use your best judgment in using them.
h4. Sanity Check