Fixing nil errors
This commit is contained in:
parent
b5d9514914
commit
98be42e9f9
@ -7,6 +7,10 @@ class UserCertification < ActiveRecord::Base
|
||||
belongs_to :certification
|
||||
|
||||
def user_name
|
||||
self.user.name unless self.user.blank?
|
||||
if self.user.blank?
|
||||
""
|
||||
else
|
||||
self.user.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user