Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 6bf5006c7872b3137cab44d077ea1240102c5f4b 1 parent cdfb8bb
emill authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 jester.js
View
8 jester.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.