X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ad434992058ed270b3380d882b91c7f2a91434be..dee70e8daae82961ceda602a0646c4828a996965:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 3b43130fa..6ea4de9be 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -207,8 +207,8 @@ class User < ActiveRecord::Base ## # return a spam score for a user def spam_score - changeset_score = self.changesets.limit(10).length * 50 - trace_score = self.traces.limit(10).length * 50 + changeset_score = self.changesets.size * 50 + trace_score = self.traces.size * 50 diary_entry_score = self.diary_entries.inject(0) { |s,e| s += e.body.spam_score } diary_comment_score = self.diary_comments.inject(0) { |s,c| s += c.body.spam_score }