title: "Unable to generate a URL for the named route
body: <p>Ive just started playing with symfony2 and im working on adding url etc.
  I cant seem to get my twig template to pick up on my function when passed its name using @Route.
  Any ideas why?</p>
  
  <p>Controller:</p>
  
  <pre><code>/**
  * @Route("/cube/{number}", name="get_cubed")
  */
  public function indexAction($number)
  {
      $cube = $number * $number * $number;
      return $this-&gt;render('NumberCubedBundle:Default:index.html.twig',
          array('number' =&gt; $number, 'cube' =&gt; $cube)
      );
  }
  </code></pre>
  
  <p>My Twig File:</p>
  
  <pre><code>{% extends '::base.html.twig' %}
  {% block title %}Cube Number Generator{% endblock %}
  {% block body %}
      {{ number }}^3 = {{ cube }}
      &lt;a href="{{ path('get_cubed', { 'number': 40 }) }}"&gt;Cube 40&lt;/a&gt;
  {% endblock %}
  </code></pre>
  
  <p>The Error: </p>
  
  <pre><code>An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "get_cubed" as such route does not exist.") in NumberCubedBundle:Default:index.html.twig at line 5. 
  </code></pre>
  
  <p>Any help would be massively appreciated.
  Thanks</p>