Module: Mongoid::Document
- Defined in:
- lib/mongoid/document.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mongoid/document.rb', line 4 def self.included(base) base.class_eval do include Components include InstanceMethods extend ClassMethods cattr_accessor :_collection, :collection_name, :embedded, :primary_key, :hereditary self. = false self.hereditary = false self.collection_name = self.name.collectionize attr_accessor :association_name, :_parent attr_reader :new_record delegate :collection, :db, :embedded, :primary_key, :to => "self.class" end end |