From 0d2be843f59038818083550bb0f9902fe6444b46 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 31 May 2016 06:37:11 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index c405e16..70e28ac 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -84,16 +84,16 @@ class Customer < ActiveRecord::Base pull unless @details value = arguments[0] method_name = n.to_s - #if @detils.respond_to?(n) - # if the method's name ends with '=' + # Check to see if the method exists + if @detils.method_defined?(n) if method_name[-1, 1] == "=" @details.method(method_name).call(value) else return @details.method(method_name).call end - #else - # super - #end + else + super + end end # proforms a bruteforce sync operation