]> git.openstreetmap.org Git - rails.git/commitdiff
Fix new rubocop warning
authorTom Hughes <tom@compton.nu>
Wed, 29 Sep 2021 17:54:56 +0000 (18:54 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 29 Sep 2021 17:54:56 +0000 (18:54 +0100)
app/models/trace.rb

index 0860d2b31954e1a3d255594650b071443399f702..b3d87fc0947be767264db9300b5426b909375415 100644 (file)
@@ -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