Kevin Dewalt
Kevin Dewalt

Reputation: 777

Good example of written Rails coding standards?

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:

  1. STYLE: Line up hash arrows for readability
  2. STYLE: put spaces around => hash arrows
  3. 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

Answers (3)

austinfromboston
austinfromboston

Reputation: 3780

Here's a style guide I rather like, Ruby-focused but definitely of the "Rails generation" of Rubyists:

Elements of Ruby Style

Credit for which belongs to Pathfinder Development:

pathfinder development logo
(source: pathf.com)

UPDATE. Two years later, I have found a better guide, brought to you by the copycopter project

Upvotes: 14

Bozhidar Batsov
Bozhidar Batsov

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

Taryn East
Taryn East

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

Related Questions