From 11e215189b8ea43a276505f8444d259c9d896ec1 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 28 Apr 2016 11:55:40 -0400 Subject: [PATCH] Update and rename qbo_customer.rb to customer.rb --- app/models/{qbo_customer.rb => customer.rb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename app/models/{qbo_customer.rb => customer.rb} (96%) diff --git a/app/models/qbo_customer.rb b/app/models/customer.rb similarity index 96% rename from app/models/qbo_customer.rb rename to app/models/customer.rb index 6df9860..3b426c4 100644 --- a/app/models/qbo_customer.rb +++ b/app/models/customer.rb @@ -8,7 +8,7 @@ # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -class QboCustomer < ActiveRecord::Base +class Customer < ActiveRecord::Base unloadable has_many :issues @@ -89,7 +89,7 @@ class QboCustomer < ActiveRecord::Base transaction do # Update the customer table customers.each { |customer| - qbo_customer = QboCustomer.find_or_create_by(id: customer.id) + qbo_customer = Customer.find_or_create_by(id: customer.id) # only update if diffrent if not qbo_customer.name == customer.display_name qbo_customer.name = customer.display_name