Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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
View
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

@guilleiguaran

@github we need :trollface: emoji

@sikachu
Collaborator

:(

@tenderlove
Owner
@brainopia

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:

@tarcieri

I'm a big fan of:

#######
private
#######
@jonleighton
Collaborator

How about:

alias :EVERYTHING_BELOW_HERE_IS_PRIVATE_OK :private

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

@fxn
Owner

Method visibility is overrated.

@josevalim
Owner
@tenderlove
Owner

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

@spastorino
Owner

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

@parndt

@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.