Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/model_manage/active_record.rb,
lib/model_manage/active_record_rails_erd.rb

Class Method Summary collapse

Class Method Details

.descendantsObject



3
4
5
# File 'lib/model_manage/active_record_rails_erd.rb', line 3

def self.descendants
  Rails.models
end

.inherited(child) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/model_manage/active_record.rb', line 3

def self.inherited(child)
  Rails.add_inherit(:models, child)
  p " #{child} inherit #{self}"
  child.class_eval do
    include ModelManage::Base
  end
end