Organize code in models using the following convention:
- Constants
- Associations
- Validations
- Callbacks
- Other macros (Devise, FriendlyId, etc.)
- Scopes
This is a mixture of conventions used by Thoughtbot and RuboCop.
Examples:
- https://github.com/lujanfernaud/prevy/blob/master/app/models/user.rb
- https://github.com/lujanfernaud/prevy/blob/master/app/models/event.rb
- https://github.com/lujanfernaud/prevy/blob/master/app/models/group.rb
- https://github.com/lujanfernaud/prevy/blob/master/app/models/topic.rb
References: