-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the new
method OK?
#23
Comments
... I guess the real question is; do the tests pass on all major browsers? |
How is it different than create? Is it meant to let you build a resource locally before saving it? |
Exactly.
|
hmmmm, yeah I can see why you asked the question then, it's the same thing as Would be nice if we could think of a nice way to do |
technically it doesn't go against conventions... lots of methods return a new object. Although I do like the |
Typically if you're gong to create a new object you use |
It does |
var ryan = stretchr.new("people", {name: Ryan}).save({
success: function(){
alert("Ryan was created with ID " + ryan.id());
}
}); |
oh...hmmm, yeah I would never use that, so I'm not the audience for it. hard to say |
So how would you create a new resource? |
|
I'd probably expect it to be new |
Since
new
is a JavaScript keyword, will having it as a method name be a problem?If so, what should we call it?
see https://github.com/stretchr/sdk-js/blob/rewrite/src/stretchr.js#L249
The text was updated successfully, but these errors were encountered: