X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..4bf81418db30e7b0a7e9a0d184cea9343ff800e5:/app/models/trace.rb diff --git a/app/models/trace.rb b/app/models/trace.rb index 957bea8bc..0b9877225 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -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