Module: Mongoid::Document
- Defined in:
- lib/model_manage/mongoid.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/model_manage/mongoid.rb', line 3 def self.included(base) Rails.add_child(:models, base) puts " #{base} include #{self}" def base.inherited(child) Rails.add_inherit(:models, child) puts " #{child} inherit #{self}" end base.class_eval do extend ModelManage::Mongoid::ClassMethods include ModelManage::Base end end |