Fixing nil errors

This commit is contained in:
Will Bradley 2013-08-26 22:11:04 -07:00
parent b5d9514914
commit 98be42e9f9

View File

@ -7,6 +7,10 @@ class UserCertification < ActiveRecord::Base
belongs_to :certification belongs_to :certification
def user_name def user_name
self.user.name unless self.user.blank? if self.user.blank?
""
else
self.user.name
end
end end
end end