From 67a50e848c8d9998a88d153429ae9d1ae25d3baf Mon Sep 17 00:00:00 2001 From: Dave Stubbs Date: Sat, 8 Nov 2008 10:48:07 +0000 Subject: [PATCH] more boolean correcting --- app/controllers/trace_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index f0d8033f2..d94280a6a 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -51,7 +51,8 @@ class TraceController < ApplicationController conditions << @tag end - conditions[0] += " AND gpx_files.visible = 1" #FIXME: use boolean true as parameter to active record + conditions[0] += " AND gpx_files.visible = ?" + conditions << true @trace_pages, @traces = paginate(:traces, :include => [:user, :tags], @@ -196,7 +197,7 @@ class TraceController < ApplicationController end def georss - conditions = ["gpx_files.public = 1"] # fixme pass boolean true as parameter + conditions = ["gpx_files.public = ?", true] if params[:display_name] conditions[0] += " AND users.display_name = ?" -- 2.43.2