From f2093eb4c413770aa010f666f680071c31d77e8f Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Mon, 10 Nov 2008 11:47:20 +0000 Subject: [PATCH 1/1] boolean correctness --- app/controllers/diary_entry_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index d9f5e4253..60f5211fd 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -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" -- 2.39.5