boolean correctness
authorAndy Allan <gravitystorm@gmail.com>
Mon, 10 Nov 2008 11:47:20 +0000 (11:47 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Mon, 10 Nov 2008 11:47:20 +0000 (11:47 +0000)
app/controllers/diary_entry_controller.rb

index d9f5e4253fedab9391f3b869e11f017c72e6218c..60f5211fd27850d32687ba40ed2379c0a8788124 100644 (file)
@@ -70,7 +70,7 @@ class DiaryEntryController < ApplicationController
     else
       @title = "Users' diaries"
       @entry_pages, @entries = paginate(:diary_entries, :include => :user,
-                                        :conditions => "users.visible = 1",
+                                        :conditions => ["users.visible = ?", true],
                                         :order => 'created_at DESC',
                                         :per_page => 20)
     end
@@ -92,7 +92,7 @@ class DiaryEntryController < ApplicationController
       end
     else
       @entries = DiaryEntry.find(:all, :include => :user,
-                                 :conditions => "users.visible = 1",
+                                 :conditions => ["users.visible = ?", true],
                                  :order => 'created_at DESC', :limit => 20)
       @title = "OpenStreetMap diary entries"
       @description = "Recent diary entries from users of OpenStreetMap"