##// END OF EJS Templates
Eager-load users....
Jean-Philippe Lang -
r2007:e8d0c26e4393
parent child
Show More
@@ -78,7 +78,7 class Repository < ActiveRecord::Base
78 78 # Default behaviour: we search in cached changesets
79 79 def changesets_for_path(path)
80 80 path = "/#{path}" unless path.starts_with?('/')
81 Change.find(:all, :include => :changeset,
81 Change.find(:all, :include => {:changeset => :user},
82 82 :conditions => ["repository_id = ? AND path = ?", id, path],
83 83 :order => "committed_on DESC, #{Changeset.table_name}.id DESC").collect(&:changeset)
84 84 end
@@ -30,7 +30,7 class Repository::Git < Repository
30 30 end
31 31
32 32 def changesets_for_path(path)
33 Change.find(:all, :include => :changeset,
33 Change.find(:all, :include => {:changeset => :user},
34 34 :conditions => ["repository_id = ? AND path = ?", id, path],
35 35 :order => "committed_on DESC, #{Changeset.table_name}.revision DESC").collect(&:changeset)
36 36 end
@@ -32,7 +32,7 class Repository::Subversion < Repository
32 32
33 33 def changesets_for_path(path)
34 34 revisions = scm.revisions(path)
35 revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC") : []
35 revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC", :include => :user) : []
36 36 end
37 37
38 38 # Returns a path relative to the url of the repository
General Comments 0
You need to be logged in to leave comments. Login now