title: Symfony routing ajax get method
body: <p>I pass by ajax GET parameters, my url looks like:</p>
  
  <pre><code>example.com/autocamplete?term=string
  </code></pre>
  
  <p>I add route for that:</p>
  
  <pre><code>autocomplete:
      path:     /autocomplete?term={term}
      defaults: { _controller: CatalogWebBundle:Default:autocomplete }
  </code></pre>
  
  <p>But it something wrong with my route, because I get error:</p>
  
  <pre><code>GET http://127.0.0.1:8000/autocomplete?term=sdfsd 500 (Internal Server Error)
  </code></pre>
  
  <p>How to rewrite my route to ajax get patameters ? </p>
  
  <p>JS is:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
  
          //autocomplete
          $("#search").autocomplete({
              source: "\/autocomplete",
              minLength: 1
          });
  
      });
  &lt;/script&gt;
  </code></pre>