title: Embed form controller in twig template: can't redirect in embedded controller after submit
body: <p>I have index action, that print 1) form for creating new Entity; 2) list of all Entities:</p>
  
  <pre><code>public function indexAction()
  {
      $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
  
      $entities = $em-&gt;getRepository('MyBundle:Entity')-&gt;findAll();
  
      return array(
          'entities' =&gt; $entities,
      );
  }
  </code></pre>
  
  <p>Twig:</p>
  
  <pre><code>{% block content %}
      {% render "MyBundle:Entity:new" %}
      {% render "MyBundle:Entity:list" %}
  {% endblock %}
  </code></pre>
  
  <p>newAction in Entity Controller is standart form controller:</p>
  
  <pre><code>public function newAction()
  {
      $entity = new Entity();
      $form = $this-&gt;createForm(new EntityType(), $entity);
  
      $request = $this-&gt;getRequest();
      if ($request-&gt;getMethod() == 'POST') {
          $form-&gt;bindRequest($request);
  
          if ($form-&gt;isValid()) {
              $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
              $em-&gt;persist($entity);
              $em-&gt;flush();
  
              // NOT WORK
              return $this-&gt;redirect($this-&gt;generateUrl('entity_show',
                  array('id' =&gt; $entity-&gt;getId())));
          }
      }
      return array(
          'form' =&gt; $form-&gt;createView(),
      );
  }
  </code></pre>
  
  <p>Redirect after entity persisting isn't work, error:</p>
  
  <pre><code>An exception has been thrown during the rendering of a template
  ("Error when rendering "http://example.com/app_dev.php/url/"
  (Status code is 302).") in MyBundle:Default:index.html.twig at line 2.
  </code></pre>