def render(*args)
      raise "missing controller" unless controller

      request = ActionDispatch::Request.new @env
      request.routes = controller._routes

      instance = controller.new
      instance.set_request! request
      instance.set_response! controller.make_response!(request)
      instance.render_to_string(*args)
    end
def render(*args)
      raise "missing controller" unless controller

      request = ActionDispatch::Request.new @env
      request.routes = controller._routes

      instance = controller.new
      instance.set_request! request
      instance.set_response! controller.make_response!(request)
      instance.render_to_string(*args)
    end
Accepts a custom Rack environment to render templates in.
 It will be merged with the default Rack environment defined by
 +ActionController::Renderer::DEFAULTS+.
 Render templates with any options from ActionController::Base#render_to_string.

 The primary options are:
 * <tt>:partial</tt> - See <tt>ActionView::PartialRenderer</tt> for details.
 * <tt>:file</tt> - Renders an explicit template file. Add <tt>:locals</tt> to pass in, if so desired.
   It shouldn’t be used directly with unsanitized user input due to lack of validation.
 * <tt>:inline</tt> - Renders an ERB template string.
 * <tt>:plain</tt> - Renders provided text and sets the content type as <tt>text/plain</tt>.
 * <tt>:html</tt> - Renders the provided HTML safe string, otherwise
   performs HTML escape on the string first. Sets the content type as <tt>text/html</tt>.
 * <tt>:json</tt> - Renders the provided hash or object in JSON. You don't
   need to call <tt>.to_json</tt> on the object you want to render.
 * <tt>:body</tt> - Renders provided text and sets content type of <tt>text/plain</tt>.

 If no <tt>options</tt> hash is passed or if <tt>:update</tt> is specified, the default is
 to render a partial and use the second parameter as the locals hash.