, wmarbut , ( ). , Ember, , . ( , , .) , . , user1517325 , wmarbut!
App.map_routes = [];
App.MapRoutes = function(routes) {
App.map_routes.push(routes);
return App.Router.map(function() {
var route_lamda, _i, _len, _ref;
_ref = App.map_routes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
route_lamda = _ref[_i];
route_lamda.call(this);
}
return true;
});
};
App.MapRoutes(function() {
this.resource("foods", function(){
});
});
App.MapRoutes(function() {
this.resource("foods", function(){
this.route("index", {path: "/"});
});
});
App.MapRoutes(function() {
this.route("fourOhFour", { path: "*:"});
});