Keep your model classes organized with a model skeleton
Create a skeleton of how you want to structure your model classes and use it whenever you create a new model. You will always know where to find what you need.
Example of my sample_model.rb
which I keep in my doc
folder.
class ModelName < ActiveRecord::Base
### Mixins & Concerns
## Associations
## Scopes
## Validations
## Callbacks
## Attributes
attr_accessible ...
## State Machine(s)
## Members
private
## Validation methods
## Callback methods
end
Written by Michel Billard
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Related Tags
#rails
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#