Class: Heliosphere::Observer
- Inherits:
-
ActiveRecord::Observer
- Object
- ActiveRecord::Observer
- Heliosphere::Observer
- Defined in:
- lib/heliosphere/observer.rb
Defined Under Namespace
Classes: SolrNotRunning
Instance Method Summary collapse
Instance Method Details
#after_destroy(object) ⇒ Object
13 14 15 |
# File 'lib/heliosphere/observer.rb', line 13 def after_destroy(object) running? { Sunspot.remove(object) } end |
#after_save(object) ⇒ Object
9 10 11 |
# File 'lib/heliosphere/observer.rb', line 9 def after_save(object) running? { Sunspot.index(object) if object.index_on_save? } end |