X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92b122759f131d161c36987999eed437c6e3b0d5..dce0f1639e9ac0c4d79182725b2996ad85c4d279:/app/models/trace.rb?ds=inline 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