]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Migration to add close-time to changesets. This replaces the boolean 'open' attribute...
[rails.git] / app / controllers / trace_controller.rb
index 6895a1bcf7d0cd63d946f71bc4a29ae167221887..d94280a6af080c469a2662212382e340e05c4387 100644 (file)
@@ -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"]
+    conditions = ["gpx_files.public = ?", true]
 
     if params[:display_name]
       conditions[0] += " AND users.display_name = ?"