diff options
Diffstat (limited to 'railties/guides/source/contributing_to_ruby_on_rails.textile')
-rw-r--r-- | railties/guides/source/contributing_to_ruby_on_rails.textile | 14 |
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 +&&+/+||+ 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 |