]> git.openstreetmap.org Git - rails.git/commitdiff
Fix up case statement syntax for ruby 1.9 compatibility
authorJason Meinzer <jason@bithive.net>
Mon, 2 Jan 2012 21:11:44 +0000 (13:11 -0800)
committerTom Hughes <tom@compton.nu>
Wed, 4 Jan 2012 22:25:41 +0000 (22:25 +0000)
app/models/spam_observer.rb

index 8b52121114581ce211145fbaac539111a218baf5..888b4a0b9cb6719624a509a343dc21fc717857f4 100644 (file)
@@ -3,9 +3,9 @@ class SpamObserver < ActiveRecord::Observer
 
   def after_save(record)
     case
-    when record.is_a?(User): user = record
-    when record.is_a?(DiaryEntry): user = record.user
-    when record.is_a?(DiaryComment): user = record.user
+    when record.is_a?(User) then user = record
+    when record.is_a?(DiaryEntry) then user = record.user
+    when record.is_a?(DiaryComment) then user = record.user
     end
 
     if user.status == "active" and user.spam_score > SPAM_THRESHOLD