From 73b75ec0b6d78ee9336d50d26122a6428b7a9381 Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 31 Jan 2011 18:10:44 +0800 Subject: [PATCH] rescue [] user.active_attributes when nil --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index b245769b..e0b2a42d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -31,7 +31,7 @@ class User # Get the active user_attribute_models def get_active_attribute_models - self.active_attributes.map{ |attr| get_attribute_model(attr) } + self.active_attributes.map{ |attr| get_attribute_model(attr) } rescue [] end # Get an user_attribute_model from key