Przeglądaj źródła

Friendlier email validation

Andrew Kane 7 lat temu
rodzic
commit
a609ac60e6
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/models/blazer/check.rb

+ 1 - 1
app/models/blazer/check.rb

@@ -75,7 +75,7 @@ module Blazer
         # but we know what they mean, so let's fix it
         # also, some people like to use whitespace
         if emails.present?
-          self.emails = emails.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
+          self.emails = emails.strip.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
         end
       end