Skip to content

Instantly share code, notes, and snippets.

@aeden
Created December 1, 2010 16:57
Show Gist options
  • Save aeden/723799 to your computer and use it in GitHub Desktop.
Save aeden/723799 to your computer and use it in GitHub Desktop.
User.all({
success: function(users){
$.each(users, function(index, user) {
console.log("all: here I am, user " + user.email + " (id:" + user.id + ")");
});
}
});
User.find(1, {
success: function(user) {
console.log("find: here I am, user " + user.email + " (id:" + user.id + ")");
}
});
@aeden
Copy link
Author

aeden commented Dec 1, 2010

Console output:

all: here I am, user undefined (id:undefined)
example.js:11find: here I am, user [email protected] (id:1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment