X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/99f5d5159542171d5b3549a2cf0f0d801ea5d88b..e42e95c3decfea7770c8d5b2df2fbd5bb3de17ef:/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