In rails, can I access response.body in a action before it returns?
Say I want to do some final string replacements before it returns, can I get access to response.b
Try after_filter in your controller.
You should be able to edit your response.body from there. For me, I needed to remove some ASCII characters in the xml hence I did this.
after_filter :sanitize_xml def sanitize_xml #clean the response body by accessing response.body