- @traces = Trace.find(:all,
- :include => [:user, :tags],
- :conditions => conditions,
- :order => "gpx_files.timestamp DESC",
- :offset => (@page - 1) * @page_size,
- :limit => @page_size)
+ @traces = @traces.visible
+ @traces = @traces.order("timestamp DESC")
+ @traces = @traces.offset((@page - 1) * @page_size)
+ @traces = @traces.limit(@page_size)
+ @traces = @traces.includes(:user, :tags)