i am using ExtJS with Rails…I am trying to delete records selected in grid through “Checkbox column”…i dnt have any idea as to how can i handle “Array” of selected records of grid through rails controller…plzz guide me…
the code on delete button is as follows :
var sm = prodgrid.getSelectionModel();
delbtn.on("click", function () {
var sel = sm.getSelections();
Ext.Ajax.request({
url: 'products/delete',
// method:'DELETE',
params: {
'prodid': sel
}
});
});
How can i iterate through “sel” array in my Rails controller?? plzz help
use
Ext.eachto iterate an array :