aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-05-08 15:12:18 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-05-08 15:12:18 +0530
commit197f3f07d6bd4fbd8e8a877e29fbad8aefba9c71 (patch)
tree7f74bf1df2cf5b55b377d8b5c44f6b14c852e058 /railties/guides
parente35ba99e4b305d347de8737b6c2fcbd9b7ce6b02 (diff)
downloadrails-197f3f07d6bd4fbd8e8a877e29fbad8aefba9c71.tar.gz
rails-197f3f07d6bd4fbd8e8a877e29fbad8aefba9c71.tar.bz2
rails-197f3f07d6bd4fbd8e8a877e29fbad8aefba9c71.zip
Included more details on Rails coding conventions (from LH Source Style page)
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/contributing_to_ruby_on_rails.textile14
1 files changed, 10 insertions, 4 deletions
diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile
index cb09b180a2..1f757eaeb2 100644
--- a/railties/guides/source/contributing_to_ruby_on_rails.textile
+++ b/railties/guides/source/contributing_to_ruby_on_rails.textile
@@ -300,10 +300,16 @@ h4. Follow the Coding Conventions
Rails follows a simple set of coding style conventions.
-* Two spaces, no tabs
-* Prefer +&amp;&amp;+/+||+ 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 +&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.
+
+These are some guidelines and please use your best judgement in using them.
h4. Sanity Check