@http.put(@saveURL, @toServerFormat())
.success (data) ->
@loadJobInvoiceItems data.job_invoice.items
JobInvoice.prototype.save = function(doNotifyOfSave) {
return this.http.put(this.saveURL, this.toServerFormat()).success(function(data) {
this.loadJobInvoiceItems(data.job_invoice.items);
if (doNotifyOfSave && typeof notifyOfSave === "function") {
return notifyOfSave(this.job.id);
}
});
};
@http.put(@saveURL, @toServerFormat())
.success (data) =>
@loadJobInvoiceItems data.job_invoice.items
JobInvoice.prototype.save = function(doNotifyOfSave) {
var _this = this;
return this.http.put(this.saveURL, this.toServerFormat()).success(function(data) {
_this.loadJobInvoiceItems(data.job_invoice.items);
if (doNotifyOfSave && typeof notifyOfSave === "function") {
return notifyOfSave(_this.job.id);
}
});
};
Created
September 27, 2012 05:35
-
-
Save cemeng/3792335 to your computer and use it in GitHub Desktop.
thin vs fat arrow in CoffeeScript
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment