Report abuse


			
class Model < ActiveRecord::Base

  CONSTANTS_GO_FIRST = true
  HERE_WE_ARE = "a constant"

  include ThenGoModules
  include ActsAsSomethingStupid

  # then go enabling methods for plugins
  acts_as_something_stupid
  acts_as_social_network

  # then associations, grouped by type
  has_many :somethings
  has_many :nothings, :through => :somethings, :as => :pretty_things

  belongs_to :eternity, :class_name => "Infinity",
             :conditions => { :dimensions => "3" }

  # here are validations, grouped by type
  validates_presence_of :something
  validates_presence_of :anything
  validates_associated :eternity
  validates_numericality_of :version

  after_create :do_something_interesting
  after_destroy :bore_everyone_and_kill_itself

  def self.here_go_class_methods(something)
  end

  def then_go_instance_methods
  end

end