The problem is that the template formatting doesn't have access to the inflector methods. Try something like this:
Code:
Ext.define('MyApp.model.Base', {
extend: 'Ext.data.Model',
requires: ['Ext.util.Inflector'],
schema: {
namespace: 'MyApp.model',
proxy: {
type: 'rest',
actionMethods: {
create: 'POST',
read: 'GET',
update: 'PUT',
destroy: 'DELETE'
},
url: '/api/{entityName:inflectorPlural}',
reader: {
type: 'json',
dateFormat: 'C',
rootProperty: 'data'
}
}
}
}, function() {
var I = Ext.util.Inflector;
Ext.util.Format.inflectorPlural = I.pluralize.bind(I);
});
Ext.define('MyApp.model.Shelf', {
extend: 'MyApp.model.Base'
});
console.log(MyApp.model.Shelf.getProxy().getUrl());