Changesets retrieval optimization on the activity view. Prevents additional query from being executed for each displayed changeset.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@952 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3b4cfe0ba8
commit
d00014221e
|
@ -442,7 +442,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if @scope.include?('changesets')
|
if @scope.include?('changesets')
|
||||||
@events += @project.repository.changesets.find(:all, :conditions => ["#{Changeset.table_name}.committed_on BETWEEN ? AND ?", @date_from, @date_to])
|
@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])
|
||||||
end
|
end
|
||||||
|
|
||||||
if @scope.include?('messages')
|
if @scope.include?('messages')
|
||||||
|
|
Loading…
Reference in New Issue