viezel / napp.alloy.adapter.restapi

RestAPI Sync Adapter for Titanium Alloy Framework
197 stars 102 forks source link

Model Save does enter into success function #22

Closed TudorStoica closed 10 years ago

TudorStoica commented 10 years ago

Not sure if this is just me but for model.save() the success callback is not called.

Here is my model

var BookModel = Alloy.createModel("Book"); BookModel.set('name','test Book'); BookModel.save({ success : function(){ Ti.API.info('Success'); }, error : function(){ Ti.API.error("hmm - this is not good!"); } });

Thanks

viezel commented 10 years ago

You need to add a empty object as the first parameter

BookModel({}, {success: function(), error:function() });
TudorStoica commented 10 years ago

That did it. Thanks

viezel commented 10 years ago

great :)