summaryrefslogtreecommitdiffstats
path: root/app/controllers/sys_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 17:37:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 17:37:16 +0000
commit2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch)
tree7a733c1cc51448ab69b3f892285305dbfb0ae15e /app/controllers/sys_controller.rb
parenta6ec78a4dc658e3517ed682792016b6530458696 (diff)
downloadredmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz
redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/sys_controller.rb')
-rw-r--r--app/controllers/sys_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb
index d8ef783eb..0b62b420c 100644
--- a/app/controllers/sys_controller.rb
+++ b/app/controllers/sys_controller.rb
@@ -19,7 +19,8 @@ class SysController < ActionController::Base
before_filter :check_enabled
def projects
- p = Project.active.has_module(:repository).order("#{Project.table_name}.identifier").preload(:repository).all
+ p = Project.active.has_module(:repository).
+ order("#{Project.table_name}.identifier").preload(:repository).to_a
# extra_info attribute from repository breaks activeresource client
render :xml => p.to_xml(
:only => [:id, :identifier, :name, :is_public, :status],
@@ -56,7 +57,7 @@ class SysController < ActionController::Base
raise ActiveRecord::RecordNotFound unless project
projects << project
else
- projects = scope.all
+ projects = scope.to_a
end
projects.each do |project|
project.repositories.each do |repository|