Force selection to fail when no traces match the tag.
authorTom Hughes <tom@compton.nu>
Tue, 21 Apr 2009 21:54:44 +0000 (21:54 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 21 Apr 2009 21:54:44 +0000 (21:54 +0000)
app/controllers/trace_controller.rb

index 47a31d314e5b42fcce1ebe41a5774f49c2373808..e6c732d2d3b760c29fbb48e4e685a32db37a56f0 100644 (file)
@@ -60,6 +60,8 @@ class TraceController < ApplicationController
 
       if files.length > 0
         conditions[0] += " AND gpx_files.id IN (#{files.join(',')})"
+      else
+        conditions[0] += " AND 0 = 1"
       end
     end