products = Product.search(JSON.parse(@campaign.q))
xml = Builder::XmlMarkup.new
xml << @campaign.wrapper_begin
products.each do |product|
@campaign.root_elements.each do |element|
xml.tag!(element.tag, element.xml_attributes(product)) do
element.decorators.each do |decorator|
element.cdata ? xml.cdata!(decorator.print_code(product).to_s) : xml << decorator.print_code(product).to_s
end
element.childs.each do |child|
xml.tag!(child.tag, child.xml_attributes(product)) do
child.decorators.each do |decorator|
child.cdata ? xml.cdata!(decorator.print_code(product).to_s) : xml << decorator.print_code(product).to_s
end
end
end
end
end
end
xml << @campaign.wrapper_end
how is this keep loging ? is there a way to disable this - my logs are humongous because of this :)
part of my service dose this :
how is this keep loging ? is there a way to disable this - my logs are humongous because of this :)