Class: LaMaquina::Piston::SunspotPiston

Inherits:
Base
  • Object
show all
Defined in:
lib/la_maquina/piston/sunspot_piston.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.mapObject

Returns the value of attribute map.



17
18
19
# File 'lib/la_maquina/piston/sunspot_piston.rb', line 17

def map
  @map
end

Class Method Details

.fire!(notified_class, id, notifier_class = "") ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/la_maquina/piston/sunspot_piston.rb', line 6

def fire!( notified_class, id, notifier_class = "" )  
  target_class = map.find notified_class
  target       = target_class.find(id)
  target.solr_index!
rescue => e
  LaMaquina.error_notifier.notify(  e,
                                    notified_class: klass,
                                    notified_id: id,
                                    notifier_class: notifier_class )
end