How generating route with parameters using Routing.generate in Symfony2?
<p>I'm trying to generate a path in an Ajax request, but I get the following error:</p>

<pre><code>Error: The route "profesor_edit" requires the parameter "id".
</code></pre>

<p>The code is as follows:</p>

<pre><code>$.ajax({
    type: 'POST',
    url: Routing.generate('verify_user'),
    data: {name:name},
    dataType: 'json',
    success: function(response) {

      if(response.data!=null){
          $("#container").load(Routing.generate('user_edit'), { id: response.data }); //"response.data" contains the value returned by the ajax call is an id value
      }
      else{
        $("#container").append("&lt;span &gt;It could not find the id&lt;/span&gt;");        
      }   
    } 
  })
</code></pre>

<p>routing file:</p>

<pre><code>user_edit:
     path:     /{id}/edit
     defaults: { _controller: "BackendBundle:User:edit" }
</code></pre>

<p>I think I will be sending the wrong parameter, but it's the only way I've ever seen. I appreciate your help.</p>