-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I came across a case where I wanted to fetch an individual model given a certain id, the quickest and easiest way I thought of doing this would be assigned a new model a given id and then fetching it from the server. I changed the code to allow for this:
I added the following in the url function for the extended Backbone.Model.prototype:
if (this.get('id') !== undefined)
return url + this.get('id') + '/';
I'm not sure if people have come across this kind of thing before and would be interested in knowing if it should be done in a different way perhaps?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels