From 9f64b0848f01fb849849380ff32756228a35eca6 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Mon, 10 Nov 2008 17:10:55 +0000 Subject: [PATCH] nil protection - mysql however has a default for enums, which is why it wasn't a problem before --- app/models/relation_member.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/relation_member.rb b/app/models/relation_member.rb index 08bb988ee..1cb6d7131 100644 --- a/app/models/relation_member.rb +++ b/app/models/relation_member.rb @@ -10,7 +10,7 @@ class RelationMember < ActiveRecord::Base end def after_initialize - self[:member_class] = self.member_type.capitalize + self[:member_class] = self.member_type.capitalize if !self.member_type.nil? end def before_save -- 2.39.5