-
Notifications
You must be signed in to change notification settings - Fork 421
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
Accessing attributes in Model destroy #171
Comments
In looking at Model.js am I wrong that this is just a change to lines 646 - 650 to do the following return function( id, attrs, success, error ) {
return ajax( str || this._shortName+"/{"+this.id+"}", addId(this, attrs, id), success, error, fixture(this, "Destroy", "-restDestroy"), "delete")
} and then removing lines 142 - 144? This worked for my case, but I am not sure if there is something else that will break because of this change. |
Just to bump this up again, in current CanJS you should be able to compose the routes with any property like
With |
Yes, this is exactly what I would need |
Then give it a try with the latest CanJS version. We can close the issue if this works right? If it doesn't please let us know and we'll fix it. |
I unfortunately don't have the bandwidth to switch from JavaScriptMVC to CanJS (unless it's less complicated than I assume), If need be it's fine to mark this as fixed and I'll reopen the issue against CanJS when we move to it if it doesn't work. |
There is an upgrade path from JavaScriptMVC 3.2 to 3.3 which comes with CanJS. But if will require some changes if you want to do live-binding etc. |
Thanks daff, do you have a link to this? If so I'll check it out. |
Repost of https://github.com/bitovi/javascriptmvc/issues/32
Similar to this question:
http://forum.javascriptmvc.com/topic/destroy-method-signature-on-model?reply=true&remember=604800&securemode=false
I have a nested route in a rails app and need additional attributes of the model instance to form it correctly. Currently only ID is passed into Destroy.
Last word from Justin on that thread "I need to think about how to make something like this a little easier."
Any more thoughts on this? Would like to be able to refer to all attributes on model in destroy().
The text was updated successfully, but these errors were encountered: