##// END OF EJS Templates
Changesets retrieval optimization on the activity view. Prevents additional query from being executed for each displayed changeset....
Jean-Philippe Lang -
r939:d00014221ed1
parent child
Show More
@@ -442,7 +442,7 class ProjectsController < ApplicationController
442 end
442 end
443
443
444 if @scope.include?('changesets')
444 if @scope.include?('changesets')
445 @events += @project.repository.changesets.find(:all, :conditions => ["#{Changeset.table_name}.committed_on BETWEEN ? AND ?", @date_from, @date_to])
445 @events += Changeset.find(:all, :include => :repository, :conditions => ["#{Repository.table_name}.project_id = ? AND #{Changeset.table_name}.committed_on BETWEEN ? AND ?", @project.id, @date_from, @date_to])
446 end
446 end
447
447
448 if @scope.include?('messages')
448 if @scope.include?('messages')
General Comments 0
You need to be logged in to leave comments. Login now