diff options
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 |