extjs编辑器网格更新rails

我正在尝试更新编辑器网格中显示的记录。但是不是更新相同的记录,而是将新记录插入数据库…我错过了什么?pllzz help..following是我的JsonStore代码:

Ext.data.Api.restActions = { create : 'POST', read : 'GET', update : 'PUT', destroy : 'DELETE' }; ProdStore = Ext.extend(Ext.data.JsonStore, { constructor: function(cfg) { cfg = cfg || {}; ProdStore.superclass.constructor.call(this, Ext.apply({ storeId: 'ProdStore', id:'ProdStore', url: 'products.json', root: 'proddata', restful:true, idProperty:'id', successProperty:'success', autoLoad:true, autoSave:false, batch:true, writer: new Ext.data.JsonWriter({ encode: false, listful: false, writeAllFields: false}), fields: [ { name:'customer_id'},{ name: 'prodnm'}, { name: 'qty'}, { name: 'rate' }, { name: 'amt'} ] }, cfg)); } }); new ProdStore(); 

商店中设置的idProperty应该是表示数据库中唯一行的字段。 也许在这种情况下customer_id?

如果这不能解决问题,我将不得不看到后端代码,以了解如何处理保存。