From 77438191fe8d9f3276d3a9e75d61cdcc511b49c4 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 12 May 2016 09:20:57 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/customer.rb b/app/models/customer.rb index 7c46318..a63f153 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -125,6 +125,12 @@ class Customer < ActiveRecord::Base #where.not(customers.map(&:id)).destroy_all end + def without_callback(*args, &block) + skip_callback(*args) + yield + set_callback(*args) + end + private # pull the details