Standard of Code Sequence of model
class Model < ActiveRecord::Base
#all mixins
include Something
extend Something
#other stuff
acts_as_taggable
paginates
#associations
has_many :something
belongs_to :something_else
#validations
validate_presence_of :something
#scopes
scope :something
#instance methods
def instance_method
end
#class methods
def self.method
end
#private methods
private
def method2
end
End
Comments
Post a Comment