diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index 1ba884a..03f13c7 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -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']