bbatsov/rails-style-guide — Issue #29: Standard for order of class / model constructs
Author: Applicat
Created: 2011-12-01 14:27:27+00:00
State: open

It would be nice to have a recommendation for the order of constructs in a class and especially in a (ActiveRecord) model.

So we know where to find specific constructs.

E.g.:

```bash
include ...
plugin_calls like translates ...
associations
belongs_to
has_one
has_many
has_and_belongs_to_many
cache associations
optional / helper associations
constants
scopes
validations
state_machine
attr_accessible
attr_*
methods
public
self.*
other
protected
private
```