Update qbo_controller.rb

This commit is contained in:
2016-08-01 20:54:42 -04:00
committed by GitHub
parent fe7cfc6b1d
commit 697ff4f9d5

View File

@@ -76,7 +76,13 @@ class QboController < ApplicationController
entities.each do |entity|
id = entity['id'].to_i
obj = entity['name'].constantize
name = entity['name']
# TODO rename all other models!
name.prepend("Qbo") if not name.eql? "Customer"
obj = name.constantize
# for merge events
obj.delete(entity['deletedId']) if entity['deletedId']