Module: Mongoid::Fields
- Defined in:
- lib/mongoid/fields.rb
Overview
:nodoc
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/mongoid/fields.rb', line 4 def self.included(base) base.class_eval do extend ClassMethods # Set up the class attributes that must be available to all subclasses. # These include defaults, fields class_inheritable_accessor :fields self.fields = {} delegate :defaults, :fields, :to => "self.class" end end |