diff --git a/app/models/customer.rb b/app/models/customer.rb index 0149432..eb7cdb0 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -109,7 +109,9 @@ class Customer < ActiveRecord::Base def get_details Thread.new { if self.id - @details = get_customer(self.id) + mutex.synchronize do + @details = get_customer(self.id) + end end } end