Sha256: 8bdfd37b23ffbc0daba165d8b4e67d3550fb4b41e95684dec69da2e02e5dbe6c

Contents?: true

Size: 611 Bytes

Versions: 5

Compression:

Stored size: 611 Bytes

Contents

class CommunicationEventObserver < ActiveRecord::Observer

	def after_commit_on_create(comm_event)
    Rails.logger.debug "CommunicationEventObserver - calling after_commit_on_create: outside transaction - #{comm_event.connection.outside_transaction?}"
    unless comm_event.comm_evt_purpose_types.first.description.include?("Change Request")
      begin
        CommunicationEventMailer.contact_notification(comm_event).deliver
      rescue Exception => e
        system_user = Party.find_by_description('Compass AE')
        AuditLog.custom_application_log_message(system_user, e)
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
erp_communication_events-3.1.0 app/observers/communication_event_observer.rb
erp_communication_events-3.0.4 app/observers/communication_event_observer.rb
erp_communication_events-3.0.3 app/observers/communication_event_observer.rb
erp_communication_events-3.0.2 app/observers/communication_event_observer.rb
erp_communication_events-3.0.1 app/observers/communication_event_observer.rb