Merge pull request #30 from 02strich/fixing_858

fix bug #858 by adding information on todos to project xml and providing
This commit is contained in:
Reinier Balt 2011-10-06 12:08:00 -07:00
commit 5f5a2045b5
2 changed files with 18 additions and 1 deletions

View file

@ -107,7 +107,14 @@ class ProjectsController < ApplicationController
respond_to do |format|
format.html
format.m &render_project_mobile
format.xml { render :xml => @project.to_xml( :except => :user_id ) }
format.xml {
render :xml => @project.to_xml(:except => :user_id) { |xml|
xml.not_done { @not_done.each { |child| child.to_xml(:builder => xml, :skip_instruct => true) } }
xml.deferred { @deferred.each { |child| child.to_xml(:builder => xml, :skip_instruct => true) } }
xml.pending { @pending.each { |child| child.to_xml(:builder => xml, :skip_instruct => true) } }
xml.done { @done.each { |child| child.to_xml(:builder => xml, :skip_instruct => true) } }
}
}
end
end