]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Bump eslint from 8.38.0 to 8.39.0
[rails.git] / app / models / trace.rb
index 957bea8bc043429b5df7c72e3b0c97c55a86d87e..0b9877225b889c11d942aa1eb6f9b13feae8caec 100644 (file)
@@ -57,7 +57,7 @@ class Trace < ApplicationRecord
 
   def tagstring=(s)
     self.tags = if s.include? ","
-                  s.split(/\s*,\s*/).grep_v(/^\s*$/).collect do |tag|
+                  s.split(",").map(&:strip).reject(&:empty?).collect do |tag|
                     tt = Tracetag.new
                     tt.tag = tag
                     tt