-
Notifications
You must be signed in to change notification settings - Fork 241
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
Save and create callbacks have different behaviors #5
Comments
|
You are right. Create is class method so you do not have access to the object already. Save is an instance method so you already have access. But in this later case, you assume the code will be as follow:
What happens if you do not have access to the local var object? As with passed in callback like:
|
Yeah, I got an idea! Thank you for clarifying, will tune as soon as get my laptop working. On 17.11.2011, at 23:20, Julien Guimontreply@reply.github.com wrote:
|
It seems that create callback is:
and save callback is
and is not bound to the object.
I would stick with one or the other. My preference is to use an explicit argument like create to pass the object to the callback.
Should be a pretty small change.
The text was updated successfully, but these errors were encountered: