I have the following model and collection:
var UserModel = Backbone.Model.extend({
url: 'api/user',
idAttribute:'username',
defaults: {
username:'',
password:'',
email:'',
tags:''
}
});
var UserCollection= Backbone.Collection.extend({
url: 'api/user',
model: UserModel
});
When I retrieve a user from the collection using:
var myUser = collection.get(username);
the username has to be in the correct case, otherwise I just get null as a result.
Is there a way to tell backbone to ignore the case for certain operations like this on?