class Chewy::Strategy::Base

This strategy raises exception on every index update asking to choose some other strategy.

Chewy.strategy(:base) do
  User.all.map(&:save) # Raises UndefinedUpdateStrategy exception
end

Public Instance Methods

leave() click to toggle source

This method called when strategy pops from the strategies stack

# File lib/chewy/strategy/base.rb, line 24
def leave; end
name() click to toggle source
# File lib/chewy/strategy/base.rb, line 11
def name
  self.class.name.demodulize.underscore.to_sym
end
update(type, _objects, _options = {}) click to toggle source

This method called when some model tries to update index

# File lib/chewy/strategy/base.rb, line 17
def update(type, _objects, _options = {})
  raise UndefinedUpdateStrategy, type
end