Sha256: eadea7e20c4c682a301bc9fa82ad833034617390a1a71ee0ee7b2a9a70774333

Contents?: true

Size: 780 Bytes

Versions: 3

Compression:

Stored size: 780 Bytes

Contents

module ErpCommunicationEvents
  class Engine < Rails::Engine
    isolate_namespace ErpCommunicationEvents
    
    #add observers
	  #this is ugly need a better way
	  (config.active_record.observers.nil?) ? config.active_record.observers = [:communication_event_observer] : config.active_record.observers << :communication_event_observer
	  config.active_record.observers << :email_address_change_event_observer
	  config.active_record.observers << :phone_number_change_event_observer
	  config.active_record.observers << :phone_number_change_event_observer

    #TODO
    #this will be removed once rails 3.2 adds the ability to set the order of engine loading
    engine = self
    config.to_prepare do
      ErpBaseErpSvcs.register_compass_ae_engine(engine)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
erp_communication_events-3.0.3 lib/erp_communication_events/engine.rb
erp_communication_events-3.0.2 lib/erp_communication_events/engine.rb
erp_communication_events-3.0.1 lib/erp_communication_events/engine.rb