Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disagree with @spastorino, @jonleighton, @tenderlove on 51ccb7f

Same-level method visibility disappears into the syntax. Indent (and
outdent) emphasize the state change that accompanies the declaration.
All methods following 'private' are private: that's a natural
hierarchy worthy of visual reinforcement.

Outdent, represent!  :trollface:
  • Loading branch information...
commit faaf694e0f94f422b34774a18b94632baad47bc2 1 parent f1baf8f
@jeremy jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/guides/source/contributing_to_ruby_on_rails.textile
2  railties/guides/source/contributing_to_ruby_on_rails.textile
@@ -309,7 +309,7 @@ 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.
+* Outdent private/protected from method definitions. Same indentation as the class/module.
* 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+.

13 comments on commit faaf694


@github we need :trollface: emoji




At least it's still better than before when it was advised to have different indentation for different methods :ok_hand:

Considering it a small victory :smirk:


I'm a big fan of:


How about:


So we know things are private below there? Seems good for AS?


Method visibility is overrated.


@jonleighton I'm Aaron Patterson, and I approve this alias.


Outdent disappears also when you're just 40 lines behind of the private clause. You need a text editor which shows where you are


@jeremy so was this actually a trolling commit or a serious commit? I ask because of effort apparently wasted with #5408 by following the guide :-)

Please sign in to comment.
Something went wrong with that request. Please try again.