Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : How do you use model.save on only a subset of field?

$
0
0
When I don't want to send some attributes on server I override serialize method and remove properties to go

  1. serialize: function(val){
  2.     var serialized = this._super(val)
  3.     delete serialized.someAttr
  4.     delete serialized.someArray
  5.     return serialized
  6. }

Another way is to use static serialize option that you can instruct how to serialize attributes (you need attributes plugin included). But would implement something more specific for this task. There is an issue on github about it.

Viewing all articles
Browse latest Browse all 3491

Trending Articles