Which is the best way to POST, PUT and DELETE from Backbone app to Rails app on different subdomains?
I have tried to fetch some data with Backbone from the Rails app and it works. I have tried to save new content with Backbone to Rails app.
I have real problems with PUT (updating a created model in database). I don't know why, but when I do in my backbone app something like: book.save()
And the book is a model that already exists on the database; instead of sending a PUT petition to the Rails APP, it is sending an OPTIONS petition, and without the data.
Ideally, I want to send a PUT petition from the Backbone app to the Rails app so that I can do something like this in my Rails app:
Book.update_attributes params[:book]
The Rails App and the Backbone app are on different subdomains on the same top-level domain.