Explorar el Código

Friendlier email validation

Andrew Kane hace 7 años
padre
commit
a609ac60e6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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