Reputation: 777
I'm in the process of developing written code standards for a Rails app and am looking for some good examples of coding standards developed by others. Something that expands a bit on the ideas discussed in...
Does anyone have a good reference to share?
http://www.scribd.com/doc/2889649/Rails-coding-standards-defined
Examples:
- STYLE: Line up hash arrows for readability
- STYLE: put spaces around => hash arrows
- STYLE: put spaces after ',' in method params - but none between method names and '('
(Note that I'm new to StackOverflow and not sure if this counts as a "question"...please advise if not...)
Upvotes: 19
Views: 9265
Reputation: 3780
Here's a style guide I rather like, Ruby-focused but definitely of the "Rails generation" of Rubyists:
Credit for which belongs to Pathfinder Development:
(source: pathf.com)
UPDATE. Two years later, I have found a better guide, brought to you by the copycopter project
Upvotes: 14
Reputation: 56595
You might have a look at the Community Rails style guide. It's fairly extensive and up-to-date with current trends in Rails development.
Upvotes: 4
Reputation: 27747
I put together this list at one point: Acts as Good Style
Covers a wide range of aspects of rails development. Every so often I rake over it and bring it up to the latest rails version (probably need to do that again soon) :)
Upvotes: 3