Module: Chewy::Type::Observe::MongoidMethods

Defined in:
lib/chewy/type/observe.rb

Instance Method Summary collapse

Instance Method Details

#update_index(type_name, *args, &block) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/chewy/type/observe.rb', line 45

def update_index(type_name, *args, &block)
  callback_options = Observe.extract_callback_options!(args)
  update_proc = Observe.update_proc(type_name, *args, &block)

  after_save(callback_options, &update_proc)
  after_destroy(callback_options, &update_proc)
end