diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-27 17:30:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-27 17:30:28 +0000 |
commit | 5ac8020801724a8a5a5dcc95e684e918f81cdcd9 (patch) | |
tree | 2b0d623bc27018705384df49b72711c1e33f31eb /app/controllers/sys_controller.rb | |
parent | 5946a941e05532b999337993f2dff0149035e7f7 (diff) | |
download | redmine-5ac8020801724a8a5a5dcc95e684e918f81cdcd9.tar.gz redmine-5ac8020801724a8a5a5dcc95e684e918f81cdcd9.zip |
Do not include extra_info attribute in SysController responses because it breaks reposman activeresource client (#8707).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7956 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/sys_controller.rb')
-rw-r--r-- | app/controllers/sys_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index 9a8c22fc7..89ad19ad4 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -20,7 +20,8 @@ class SysController < ActionController::Base def projects p = Project.active.has_module(:repository).find(:all, :include => :repository, :order => 'identifier') - render :xml => p.to_xml(:include => :repository) + # 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 def create_project_repository @@ -31,7 +32,7 @@ class SysController < ActionController::Base logger.info "Repository for #{project.name} was reported to be created by #{request.remote_ip}." project.repository = Repository.factory(params[:vendor], params[:repository]) if project.repository && project.repository.save - render :xml => project.repository, :status => 201 + render :xml => project.repository.to_xml(:only => [:id, :url]), :status => 201 else render :nothing => true, :status => 422 end |