title: Backbone.js : What's the correct way of using the latest Backbone routes?
body: <p>So I'm running into a few issues with the latest Backbone.js release 0.9.0. It includes some changes to its routes component. One of the confusing ones is the removal of "leading slashes". There is a discussion on GitHub <a href="https://github.com/documentcloud/backbone/issues/848" rel="nofollow">https://github.com/documentcloud/backbone/issues/848</a>.</p>
  
  <p>With the previous version, I would do</p>
  
  <pre><code>routes:
    "" : "search"
    "search/:type/:keywords" : "search"
  </code></pre>
  
  <p>And that would handle all types of scenarios including</p>
  
  <pre><code>search/a/b
  search//b (when a is null or empty)
  search/a/
  </code></pre>
  
  <p>But now I have to do</p>
  
  <pre><code>routes:
    "" : "search"
    "search/:type"  : "search"
    "search/:type/" : "search"
    "search/:type/:keywords" : "search"
    "search/:type/:keywords/" : "search"
  </code></pre>
  
  <p>In order to make sure different combinations of URL parameters are handled properly.</p>
  
  <p>I understand their rationale on removing this and in that case, am I implementing this correctly? I seem to "over-work" on something that was easily and well handled in the previous version.</p>