X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92b122759f131d161c36987999eed437c6e3b0d5..f29ba01eb90b1db5937aeaee3b625e8840715396:/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