From 346fddad27c65d76d8d8a68826581f3a2c4a4d42 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 29 Apr 2016 09:59:21 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 16ea7a2..60b5205 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -18,7 +18,7 @@ class Customer < ActiveRecord::Base attr_accessible :name validates_presence_of :id, :name - after_initialize :get_details + after_find :get_details, :unless self.primary_key = :id