title: Controller not rendering the template
body: <p>I am using FOS bundle to implement REST API in symfony.</p>
  
  <p>I have a controller called termsController in which i have implemented all the routes for REST API.</p>
  
  <p>The routes for put,get,post and delete return an array but i want the function newTermAction (whose route would be /terms/new ) to render a template.</p>
  
  <p>That is this route should direct to the form from where il make the post call</p>
  
  <p>But the template is not getting rendered and the output is the raw html code</p>
  
  <p>Here is the function</p>
  
  <pre><code>public function newTermsAction()
    {
  
      return $this-&gt;render('default/termForm.html.twig');
    }
  </code></pre>
  
  <p>Config.yml file</p>
  
  <pre><code>sensio_framework_extra:
      view:   {   annotations: false }
      router: {   annotations: true }
  
  fos_rest:
      param_fetcher_listener: true
      body_listener: true
      format_listener: true
      view:
          view_response_listener: 'force'
          formats:
              xml: true
              json : true
          templating_formats:
              html: true
          force_redirects:
              html: true
          failed_validation: HTTP_BAD_REQUEST
          default_engine: twig
      routing_loader:
          default_format: json
  </code></pre>
  
  <p>I have tried using this but this is not working</p>
  
  <pre><code>$view = $this-&gt;view()
              -&gt;setTemplate("TermsBundle:Default:termForm.html.twig");
      return $this-&gt;handleView($view);
  
  Error : Attempted to call an undefined method named \"view\" of class
  </code></pre>