title: Mixing backbone.js routers and rails controllers
body: <p>I'm currently attempting to wrap my head around grafting backbone.js into my rails application.  For starters, I want to build it into a a specific part of the rails application at /applications.  With that said I have a rails resource "resources :applications" which gives me localhost:3000/applications.  Now when I instantiate backbone for /applications I get anchor tags for the backbone routing at that rails resource.  IE localhost:3000/applications/#applications/5.</p>
  
  <p>Given that I'm only going to be using backbone at specific parts of the rails app, thus not making it a single page app, is this the right way to do things?  The URL appears to be a bit redundant.</p>
  
  <p>The correct answer might be that I need to do away with the backbone router?  If so, then how can :id be passed to the backbone application when attempting to look up a collection / model.</p>
  
  <p>The point of me using backbone is to help organize a particular section of the rails app that will be javascript heavy.</p>
  
  <p>I should mention that I can change the router to something like:</p>
  
  <pre><code>routes:
   '': 'index'
   ':id': 'show'
  </code></pre>
  
  <p>which will give me the url of localhost:3000/applications/#/1 - however I think this paints me into a corner and will not allow me to use backbone on other rails resources.  If I were to have localhost:3000/dashboard with backbone invoked then the wrong backbone.js functionality would get executed.</p>
  
  <p>Another thought would be to have an invocation of a backbone router per rails resource.  I could use the aforementioned routes code since the router would only be invoked for that rails resource.</p>