summaryrefslogtreecommitdiffstats
path: root/app/controllers/sys_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-15 18:19:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-15 18:19:19 +0000
commit1bd5e58c847816ae5751ee0026e55597d1541dd4 (patch)
treeb5c1be1f966f8b08986978713882856d014e363d /app/controllers/sys_controller.rb
parentd996cc0584901e7f44171093b170f882978124f7 (diff)
downloadredmine-1bd5e58c847816ae5751ee0026e55597d1541dd4.tar.gz
redmine-1bd5e58c847816ae5751ee0026e55597d1541dd4.zip
Adds support for multiple repositories per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/sys_controller.rb')
-rw-r--r--app/controllers/sys_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb
index 89ad19ad4..0644fed84 100644
--- a/app/controllers/sys_controller.rb
+++ b/app/controllers/sys_controller.rb
@@ -19,7 +19,7 @@ class SysController < ActionController::Base
before_filter :check_enabled
def projects
- p = Project.active.has_module(:repository).find(:all, :include => :repository, :order => 'identifier')
+ p = Project.active.has_module(:repository).find(:all, :include => :repository, :order => "#{Project.table_name}.identifier")
# extra_info attribute from repository breaks activeresource client
render :xml => p.to_xml(:only => [:id, :identifier, :name, :is_public, :status], :include => {:repository => {:only => [:id, :url]}})
end
@@ -44,11 +44,11 @@ class SysController < ActionController::Base
if params[:id]
projects << Project.active.has_module(:repository).find(params[:id])
else
- projects = Project.active.has_module(:repository).find(:all, :include => :repository)
+ projects = Project.active.has_module(:repository).all
end
projects.each do |project|
- if project.repository
- project.repository.fetch_changesets
+ project.repositories.each do |repository|
+ repository.fetch_changesets
end
end
render :nothing => true, :status => 200