Hi,
I have a rails application and i am trying to load some data from it.
I have this store which uses a model that just has some fields, nothing more.
Code:
Ext.define('MyStore', {
extend: 'Ext.data.Store',
requires: [
'MyModel'
],
config: {
autoLoad: true,
model: 'MyModel',
proxy: {
type: 'rest',
enablePagingParams: false,
noCache: false,
url: '/home/index',
format: 'json',
reader: {
type: 'json',
rootProperty: 'data',
record: 'model'
}
}
}
});
When the store loads, it uses the json format but it also adds this parameters as i see it in the rails console:
Code:
Started GET "/home/index.json" for 127.0.0.1 at 2012-03-27 00:46:51 +0100
Processing by HomeController#show as JSON
Parameters: {"id"=>"index"}
Obviously this makes rails route the request to the show action and not the index action.
Any ideas why this happens?
Thanks
Manuel Silva