summaryrefslogtreecommitdiffstats
path: root/app/models/repository
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-11 12:50:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-11 12:50:11 +0000
commite8d0c26e4393b0d88f9c62afd12268269b1bd818 (patch)
tree52a040876f79c028e7c880c1ee25018a5ed0fc3c /app/models/repository
parent4ed95ffff63d45ff6ebfab5a2452d2965e968c1d (diff)
downloadredmine-e8d0c26e4393b0d88f9c62afd12268269b1bd818.tar.gz
redmine-e8d0c26e4393b0d88f9c62afd12268269b1bd818.zip
Eager-load users.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2009 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository')
-rw-r--r--app/models/repository/git.rb2
-rw-r--r--app/models/repository/subversion.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb
index 6fcb760e6..41d4b6498 100644
--- a/app/models/repository/git.rb
+++ b/app/models/repository/git.rb
@@ -30,7 +30,7 @@ class Repository::Git < Repository
end
def changesets_for_path(path)
- Change.find(:all, :include => :changeset,
+ Change.find(:all, :include => {:changeset => :user},
:conditions => ["repository_id = ? AND path = ?", id, path],
:order => "committed_on DESC, #{Changeset.table_name}.revision DESC").collect(&:changeset)
end
diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb
index 3981d6f4c..9515e6b76 100644
--- a/app/models/repository/subversion.rb
+++ b/app/models/repository/subversion.rb
@@ -32,7 +32,7 @@ class Repository::Subversion < Repository
def changesets_for_path(path)
revisions = scm.revisions(path)
- revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC") : []
+ revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC", :include => :user) : []
end
# Returns a path relative to the url of the repository