Browse Source

Fix double space in full_name

Maarten van den Berg 6 years ago
parent
commit
6c06054c62
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/person.rb

+ 1 - 1
app/models/person.rb

@@ -54,7 +54,7 @@ class Person < ApplicationRecord
54 54
 
55 55
   # The person's full name.
56 56
   def full_name
57
-    if self.infix
57
+    if self.infix&.present?
58 58
       [self.first_name, self.infix, self.last_name].join(' ')
59 59
     else
60 60
       [self.first_name, self.last_name].join(' ')