asciidisco / asciidisco/Backbone.Rpc

model.save and json object

Open
#12 3 comments 0 reactions 1 assignee Claimed by @asciidisco View on GitHub
question
Dominant language
JavaScript
Stars
50
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Hi, i have start using your plugin and i have some questions

when i do model.save(), i see that no parameters are send in the request.
so i have saved the model this:
this.model.save({param:this.model.toJSON()})

my question is there any other technique which i can use to send the parameters as an
json object?

EDIT:

Hello,
hope you can help.

I'm using your backbone.rpc plugin and probably i'm doing something wrong.
each time i save the model i get duplication in my backbone model.
i have the regular model properties as well as the param object that contains the model properties.

I'm using this like so:

method deceleration in model:
create: ['saveCampaign', 'params'],

save method:
this.model.save({params:that.model.toJSON()});

what exactly i'm doing wrong?, how can i save the backbone.model, without seting each property like you have on your git example.
hope you can help

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.