- 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)
- end
-
- render :text => rss.to_s, :content_type => "application/rss+xml"
+ @traces = @traces.order("timestamp DESC")
+ @traces = @traces.limit(20)
+ @traces = @traces.includes(:user)