Procházet zdrojové kódy

Fix double space in full_name

Maarten van den Berg %!s(int64=6) %!d(string=před) roky
rodič
revize
6c06054c62
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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(' ')