]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Fix new rubocop warnings
[rails.git] / app / models / user.rb
index 7a8414ec073c177940ad9601511467d7d89c96e2..9eeb98290360d58cda7c759ec7b8dc37e6fb754e 100644 (file)
@@ -277,9 +277,7 @@ class User < ActiveRecord::Base
   ##
   # perform a spam check on a user
   def spam_check
-    if status == "active" && spam_score > SPAM_THRESHOLD
-      update(:status => "suspended")
-    end
+    update(:status => "suspended") if status == "active" && spam_score > SPAM_THRESHOLD
   end
 
   ##