My rails app produces XML when I load /reports/generate_report.
On a separate page, I want to read this XML into a variable and save it to the database.
How can I do this? Can I somehow stream the response from the /reports/generate_report.xml URI into a variable? Or is there a better way to do it since the XML is produced by the sa...
Trying to do the following
@message = render_to_string ( :sender => sender, :template => "template" )
But when accessing @sender in template it turns out to be nil:NilClass. Double checked if I pass the right variable and it's totally fine. Maybe there are other way to pass variables to render_to_string?
...
hello,
i have a problem with django's render_to_string and encoding single quotes.
... = render_to_string('dummy.txt', {'request':request, 'text':text,}, context_instance=RequestContext(request)))
why are only these quotes translated to '#39;' and all other special characters not?
...