codebrew / backbone-rails

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

Overridden sync method doesn't support Backbone.emulateHTTP #141

Closed joshuacronemeyer closed 10 years ago

joshuacronemeyer commented 11 years ago

Backbone.emulateHTTP doesn't work with backbone-rails. :( That option comes in really handy when you have to work with Akamai, which by default doesn't support HTTP put or delete methods.

Derbeth commented 11 years ago

Can you check if the fix proposed in #140 solves your issue? I switched to the branch containing the fix by putting

gem 'rails-backbone', '~> 0.9.0', :git => 'https://github.com/gabetax/backbone-rails', :branch => 'issue-139'

to my Gemfile.

joshuacronemeyer commented 11 years ago

ok. that fixes it. you can close this when #140 is merged. i've since moved to using vanilla backbone.js but will look at using backbone-rails again when they start using the real sync method.

westonplatter commented 10 years ago

@joshuacronemeyer - saw your PR. I think Backbone.sync should be fixed with Backbone 1.0.0 update and the same implementation here, https://github.com/westonplatter/railsy_backbone/blob/master/vendor/assets/javascripts/railsy_backbone.sync.js. I'd love to have your opinion on it if you have a chance to take a look. :+1:

Plus, added docs to make the Backbone.sync override less "magical", http://westonplatter.com/railsy_backbone/vendor/assets/javascripts/railsy_backbone.sync.html.

manusajith commented 10 years ago

This should now be fixed by f627521