Permalink
Browse files

Made the checkNew operation asynchronous, removed _index_url.

git-svn-id: https://svn.thoughtbot.com/jester/trunk@112 d7758119-aa2c-0410-afcd-b700fbd0d0b3
  • Loading branch information...
1 parent cdfb8bb commit 6bf5006c7872b3137cab44d077ea1240102c5f4b emill committed Oct 25, 2007
Showing with 4 additions and 4 deletions.
  1. +4 −4 jester.js
View
@@ -87,7 +87,8 @@ Object.extend(Jester.Resource, {
buildAttributes: function(model, async)
{
model = model || this;
- async = async || false;
+ if (async == null)
+ async = true;
var buildWork = bind(model, function(doc) {
this._attributes = this._attributesFromTree(doc[this._singular_xml]);
@@ -116,9 +117,8 @@ Object.extend(Jester.Resource, {
},
requestAndParse : function(format, callback, url, options, user_callback, remote) {
- if (remote && format == "json" && user_callback) {
+ if (remote && format == "json" && user_callback)
return this.loadRemoteJSON(url, callback, user_callback)
- }
parse_and_callback = null;
if (format.toLowerCase() == "json") {
@@ -289,7 +289,7 @@ Object.extend(Jester.Resource, {
list : "/" + options.plural + "." + options.format,
new : "/" + options.plural + "/new." + options.format
}
- urls.index = urls.create = urls.list;
+ urls.create = urls.list;
urls.destroy = urls.update = urls.show;
return urls;

0 comments on commit 6bf5006

Please sign in to comment.