From dfea1a1097aeba999b589527d0f65c8db387cadc Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 23 Feb 2011 16:01:43 -0500 Subject: [PATCH] add extra error tracking to saving user, too --- app/models/user.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 4e422d09..a13ade3a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -30,7 +30,11 @@ class User < ActiveRecord::Base raise ActiveRecord::RecordNotSaved, "#{e.message}, #{contribution.inspect}, #{contribution.valid?.inspect}, #{contribution.errors.inspect}" end end - save! + begin + save! + rescue ActiveRecord::RecordNotSaved => e + raise ActiveRecord::RecordNotSaved, "#{e.message}, #{self.inspect}, #{self.valid?.inspect}, #{self.errors.inspect}" + end end new_points end