From: Tom Hughes Date: Wed, 29 Sep 2021 17:54:56 +0000 (+0100) Subject: Fix new rubocop warning X-Git-Tag: live~1967 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/22377cbdd48a19473feff45d18e57e9501a3aceb?hp=6e0f4acfe1fdd6d6a076926147543113465c6626 Fix new rubocop warning --- diff --git a/app/models/trace.rb b/app/models/trace.rb index 0860d2b31..b3d87fc09 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -53,7 +53,7 @@ class Trace < ApplicationRecord def tagstring=(s) self.tags = if s.include? "," - s.split(/\s*,\s*/).reject { |tag| tag =~ /^\s*$/ }.collect do |tag| + s.split(/\s*,\s*/).grep_v(/^\s*$/).collect do |tag| tt = Tracetag.new tt.tag = tag tt