user builder to build your xml template and render the template
create a file service.xml.builder in the view directory for that
controller
then
xml.rsp(:status_code => “0”, :status_message=> “Success”)
xml.daily_counts @services.each do |service|
xml.count(service.code,:date=> service.date)
end
end
then render => “services”
there you have it
214
205
14
44
21
241
14
Hi radhames brito
thanx for your support.
Can you give the link from where I learn more. How to create XML.
what you tell me above is very nice. But I wanna know how it is working.
user builder to build your xml template and render the template
create a file service.xml.builder in the view directory for that
controller
then
xml.rsp(:status_code => “0”, :status_message=> “Success”)
xml.daily_counts @services.each do |service|
xml.count(service.code,:date=> service.date)
end
end