【发布时间】:2012-05-03 12:28:10
【问题描述】:
我正在尝试使用 sencha touch on rails 加载资源,但出现以下错误:
Started OPTIONS "/menu_items.json?_dc=1322512349038&limit=25&sort=%5B%7B%22property%22%3A%22name%22%2C%22direction%22%3A%22ASC%22%7D%5D" for 127.0.0.1 at 2011-11-28 18:32:29 -0200
ActionController::RoutingError (No route matches [OPTIONS] "/menu_items.json"):
我的商店代码:
new Ext.data.Store({
model: 'MenuItem',
sorters: 'name',
getGroupString: function(r){
return r.get('name')[0] || "";
},
proxy: {
type: 'rest',
url: 'http://localhost:3000/menu_items',
format: 'json',
reader: {
type: 'json',
root: 'menu_item'
}
},
listeners: {
load: { fn: this.initializeData, scope: this }
}
})
【问题讨论】:
标签: ruby-on-rails sencha-touch extjs