Class: ThinkingSphinx::ActiveRecord::Callbacks::AssociationDeltaCallbacks
- Inherits:
-
Object
- Object
- ThinkingSphinx::ActiveRecord::Callbacks::AssociationDeltaCallbacks
- Defined in:
- lib/thinking_sphinx/active_record/callbacks/association_delta_callbacks.rb
Instance Method Summary collapse
- #after_commit(instance) ⇒ Object
-
#initialize(path) ⇒ AssociationDeltaCallbacks
constructor
A new instance of AssociationDeltaCallbacks.
Constructor Details
#initialize(path) ⇒ AssociationDeltaCallbacks
Returns a new instance of AssociationDeltaCallbacks.
4 5 6 |
# File 'lib/thinking_sphinx/active_record/callbacks/association_delta_callbacks.rb', line 4 def initialize(path) @path = path end |
Instance Method Details
#after_commit(instance) ⇒ Object
8 9 10 11 12 |
# File 'lib/thinking_sphinx/active_record/callbacks/association_delta_callbacks.rb', line 8 def after_commit(instance) Array(objects_for(instance)).each do |object| object.update :delta => true unless object.frozen? end end |