$this->put() doesn't work with backbone.js #70

Closed
munirehmad opened this Issue Nov 28, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@munirehmad

Been pulling my hairs for last two hours because of this bug.

When I call model.save() from backbone the function where the put request is routed doesn't gets any PUT data.

Firebug shows right PUT parameters being sent. However $this->put('keyname') never returns data always false.

@munirehmad

This comment has been minimized.

Show comment Hide comment
@munirehmad

munirehmad Nov 28, 2011

OTOH If I set

Backbone.emulateJSON = true;  

I can work, as then Backbone will send all PUT data under a single attribute named "model", using this way $this->put('model'); works

Then
$data = json_decode($this->put('model'),true); // to get normal behavior which sucks

OTOH If I set

Backbone.emulateJSON = true;  

I can work, as then Backbone will send all PUT data under a single attribute named "model", using this way $this->put('model'); works

Then
$data = json_decode($this->put('model'),true); // to get normal behavior which sucks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment