- conditions[0] += " AND EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)"
- conditions << params[:tag]
- end
-
- traces = Trace.find(:all, :include => :user, :conditions => conditions,
- :order => "timestamp DESC", :limit => 20)
-
- rss = OSM::GeoRSS.new
-
- traces.each do |trace|
- rss.add(trace.latitude, trace.longitude, trace.name, trace.user.display_name, url_for({:controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name}), "<img src='#{url_for({:controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name})}'> GPX file with #{trace.size} points from #{trace.user.display_name}", trace.timestamp)