You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there's a good reason for this, it can be disregarded, but why is the idAttribute option overriden instead of always just using the url() method?
in my use case, I've got an Option model with an Options collection, and I want to create a <select> with the options as <options>, and I end up with three ugly possibilities:
end up with a bunch of <option value="/api/v1/option/<id>"> which is semantically wrong
do <option value="<%= option.get("id") %>"> when <option value="<%= option.id %>"> would suffice and is more natural AND THEN I've got to do collection.find(function(x) { return x.get('id') == id }) instead of just collection.get(id)
set idAttribute: "id" in all of my models.. which means explicitly set things back to default.
I would like to leave this open to discussion. What's the main argument to keep things as they are? It looks like the strongest argument here is "resource_uri is the only attribute that can be assumed to be present" bit in #20 (comment)
if there's a good reason for this, it can be disregarded, but why is the
idAttribute
option overriden instead of always just using theurl()
method?in my use case, I've got an Option model with an Options collection, and I want to create a
<select>
with the options as<options>
, and I end up with three ugly possibilities:<option value="/api/v1/option/<id>">
which is semantically wrong<option value="<%= option.get("id") %>">
when<option value="<%= option.id %>">
would suffice and is more natural AND THEN I've got to docollection.find(function(x) { return x.get('id') == id })
instead of justcollection.get(id)
idAttribute: "id"
in all of my models.. which means explicitly set things back to default.With the current
url()
override in https://github.com/PaulUithol/backbone-tastypie/blob/master/backbone_tastypie/static/js/backbone-tastypie.js#L102 this shouldn't be necessaryThe text was updated successfully, but these errors were encountered: