Module: Promiscuous::Subscriber::Model::Observer
- Extended by:
- ActiveSupport::Concern
- Includes:
- Base
- Defined in:
- lib/promiscuous/subscriber/model/observer.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #__promiscuous_eventual_consistency_update(operation) ⇒ Object
- #__promiscuous_update(payload, options = {}) ⇒ Object
- #destroy ⇒ Object
- #save! ⇒ Object
Instance Method Details
#__promiscuous_eventual_consistency_update(operation) ⇒ Object
11 12 13 |
# File 'lib/promiscuous/subscriber/model/observer.rb', line 11 def __promiscuous_eventual_consistency_update(operation) true end |
#__promiscuous_update(payload, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/promiscuous/subscriber/model/observer.rb', line 15 def __promiscuous_update(payload, ={}) super case payload.operation when :create run_callbacks :create run_callbacks :save when :update run_callbacks :update run_callbacks :save when :destroy run_callbacks :destroy else raise "Unknown operation #{payload.operation}" end end |
#destroy ⇒ Object
31 32 33 |
# File 'lib/promiscuous/subscriber/model/observer.rb', line 31 def destroy run_callbacks :destroy end |
#save! ⇒ Object
35 36 |
# File 'lib/promiscuous/subscriber/model/observer.rb', line 35 def save! end |