]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Dressed up friend_notification mail
[rails.git] / app / models / user.rb
index 2cdb9404663ae26902506a6a59ab9e4e9ec0f242..e6d7a4e46f31cfbbc3a7f2b3d7a88944ffabd4f2 100644 (file)
@@ -216,8 +216,8 @@ class User < ActiveRecord::Base
   def spam_score
     changeset_score = changesets.size * 50
     trace_score = traces.size * 50
   def spam_score
     changeset_score = changesets.size * 50
     trace_score = traces.size * 50
-    diary_entry_score = diary_entries.inject(0) { |a, e| a + e.body.spam_score }
-    diary_comment_score = diary_comments.inject(0) { |a, e| a + e.body.spam_score }
+    diary_entry_score = diary_entries.inject(0) { |acc, elem| acc + elem.body.spam_score }
+    diary_comment_score = diary_comments.inject(0) { |acc, elem| acc + elem.body.spam_score }
 
     score = description.spam_score / 4.0
     score += diary_entries.where("created_at > ?", 1.day.ago).count * 10
 
     score = description.spam_score / 4.0
     score += diary_entries.where("created_at > ?", 1.day.ago).count * 10