From 10ec2a1b1b0015f5d60f36bde7fac3595da7c19e Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 11 May 2016 11:47:28 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 9d2cba6..cda4c70 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -118,24 +118,6 @@ class Customer < ActiveRecord::Base #where.not(customers.map(&:id)).destroy_all end - # Magic Method - def method_missing(name, *arguments) - value = arguments[0] - name = name.to_s - - # if the method's name ends with '=' - if name[-1, 1] == "=" - method_name = name[0..-2] - @details[method_name] = value - else - begin - return @details[name] - rescue - return nil - end - end - end - private # Push the updates