]> git.openstreetmap.org Git - rails.git/commitdiff
Fix bad database query for RSS feeds of trace file tags
authorTom Hughes <tom@compton.nu>
Sun, 19 Feb 2012 11:48:33 +0000 (11:48 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Feb 2012 11:48:33 +0000 (11:48 +0000)
app/controllers/trace_controller.rb

index 0ab87f6af72ef3b7fae671375aa1872b7022a3d9..d709b5cf10991433840cff8c64d3ee6efa5bd281 100644 (file)
@@ -224,7 +224,7 @@ class TraceController < ApplicationController
     end
 
     if params[:tag]
-      traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)")
+      traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)", params[:tag])
     end
 
     traces = traces.order("timestamp DESC")