change << to write for ActionDispatch::response