Module: Mongoload::AutoIncludableModel

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongoload/patches/document.rb

Instance Method Summary collapse

Instance Method Details

#auto_include_contextObject



15
16
17
# File 'lib/mongoload/patches/document.rb', line 15

def auto_include_context
  @auto_include_context ||= Mongoload::AutoIncludeContext.new.register_docs(self)
end

#initialize_copy(other) ⇒ Object



10
11
12
13
# File 'lib/mongoload/patches/document.rb', line 10

def initialize_copy(other)
  super
  @auto_include_context = nil
end

#reloadObject



19
20
21
22
# File 'lib/mongoload/patches/document.rb', line 19

def reload(*)
  @auto_include_context = nil
  super
end