module Elastictastic::Callbacks
Constants
- HOOKS
Public Instance Methods
create(options = {})
click to toggle source
Calls superclass method
# File lib/elastictastic/callbacks.rb, line 16 def create(options = {}) with_callbacks(:create, options) { super } end
destroy(options = {})
click to toggle source
Calls superclass method
# File lib/elastictastic/callbacks.rb, line 24 def destroy(options = {}) with_callbacks(:destroy, options) { super } end
save(options = {})
click to toggle source
Calls superclass method
# File lib/elastictastic/callbacks.rb, line 12 def save(options = {}) with_callbacks(:save, options) { super } end
update(options = {})
click to toggle source
Calls superclass method
# File lib/elastictastic/callbacks.rb, line 20 def update(options = {}) with_callbacks(:update, options) { super } end
Private Instance Methods
with_callbacks(name, options) { || ... }
click to toggle source
# File lib/elastictastic/callbacks.rb, line 30 def with_callbacks(name, options) if options[:callbacks] == false then yield else run_callbacks(name) { yield } end end