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