rescue [] user.active_attributes when nil
This commit is contained in:
1 parent
e6546fdc19
commit
73b75ec0b6
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user