[Jifty-commit] jifty branch, jifty_client, updated. 225ec1e01779a11eedfa5f36366e2aed81a89057

Jifty commits jifty-commit at lists.jifty.org
Sun May 2 03:01:54 EDT 2010


The branch, jifty_client has been updated
       via  225ec1e01779a11eedfa5f36366e2aed81a89057 (commit)
      from  2e99bfb17d12391a1ae12cdf8e6698bf3fafd204 (commit)

Summary of changes:
 share/web/static/js/jifty_client.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 225ec1e01779a11eedfa5f36366e2aed81a89057
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sun May 2 15:01:38 2010 +0800

    Use the correct syntax for calling the constructor

diff --git a/share/web/static/js/jifty_client.js b/share/web/static/js/jifty_client.js
index da32078..8ec7b98 100644
--- a/share/web/static/js/jifty_client.js
+++ b/share/web/static/js/jifty_client.js
@@ -1,11 +1,12 @@
 Class("JiftyModel", {
     classMethods: {
         load: function (id, onSuccess, onFailure) {
+            var that = this;
             var className = this.meta.getName();
 
             var onAjaxSuccess = function (result) {
                 if (result.id) {
-                    var record = this.new(result);
+                    var record = that.meta.instantiate(result);
                     onSuccess(record);
                 }
                 else {

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list