Module: MmPartialUpdate::Plugins::PartialUpdate::Document::InstanceMethods

Defined in:
lib/mm_partial_update/plugins/document.rb

Instance Method Summary collapse

Instance Method Details

#create_or_update_changes(options = {}) ⇒ Object



13
14
15
# File 'lib/mm_partial_update/plugins/document.rb', line 13

def create_or_update_changes(options={})
  new? ? save(:validate=>false, :safe=>options[:safe]) : super
end

#save_to_collection(options = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/mm_partial_update/plugins/document.rb', line 17

def save_to_collection(options={})
  strategy = determine_persistence_strategy(options)
  return super if new? || strategy == :full_document

  save_changes(options.merge(:validate=>false, :callbacks=>false))
end