codebrew / backbone-rails

Easily use backbone.js with rails 3.1
MIT License
1.62k stars 255 forks source link

Leading slash in generated routes causes issues with rails 3.2.3 #106

Open justin808 opened 12 years ago

justin808 commented 12 years ago

I had to change the generated model_routes.js to this (no leading slash). Otherwise, the router was not picking up the url requests like: http://localhost:3000/posts/#/new

  routes:
    "new"      : "newPost"
    "index"    : "index"
    ":id/edit" : "edit"
    ":id"      : "show"
    ".*"       : "index"
ryanfitz commented 12 years ago

what version of rails-backbone are you using? The latest version should be generating routes without the leading slashes.

zhubert commented 12 years ago

same issue I reported, pull request has been submitted

ryanfitz commented 12 years ago

I see, I had it fixed in the route generator, but not in the scaffold generator.

@zhubert I pulled in your fix, I'll get a release out shortly. Thanks

justin808 commented 12 years ago

Any explanation for the "why" behind the change?