-
-
Save mattconnolly/9042186 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Model < ParentModel | |
include Foo::Bar | |
extend Bar::Baz | |
acts_as_authentic | |
dsl_specific_flags | |
module InternalModule | |
... | |
end | |
default_scope :order => 'id ASC' | |
belongs_to :foo | |
has_one :baz | |
has_many :bars | |
has_many :maz, :through => :daz | |
has_and_belongs_to_many :jaz | |
serialize :bars, Hash | |
... | |
before_validation :foo | |
after_validation :bar | |
before_save :baz | |
before_create :taz | |
after_create :daz | |
after_save :maz | |
after_commit :laz | |
... | |
validates_presence_of :id | |
validates_uniqueness_of :id | |
validates_inclusion_of :rating, :in => [1..10] | |
validates_numericality_of :taz | |
... | |
accepts_nested_attributes_for :foobar | |
scope :by_name, :order => 'name ASC' | |
scope :lambda_scope, :lambda => { |lambda| { ... } } | |
... | |
attr_reader :foobaz | |
attr_accessor :foobar | |
delegate :barbaz, :to => :foo | |
... | |
def self.class_method | |
end | |
def instance_method | |
end | |
protected | |
def self.class_method | |
end | |
def instance_method | |
end | |
private | |
def self.class_method | |
end | |
def instance_method | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment