Returns binary content (downloadable file), converted to a String
Source Code
# File action_controller/test_process.rb, line 269 def binary_content raise "Response body is not a Proc: #{body.inspect}" unless body.kind_of?(Proc) require 'stringio' sio = StringIO.new body.call(self, sio) sio.rewind sio.read end
<code/>and<pre/>for code samples.