Skip to content

Instantly share code, notes, and snippets.

@jeregrine
Last active December 23, 2015 11:49
Show Gist options
  • Save jeregrine/6631383 to your computer and use it in GitHub Desktop.
Save jeregrine/6631383 to your computer and use it in GitHub Desktop.
When the HomeCategoryIndex is called params are null.
App.Router.map(function(){
this.resource("home", {path: "/"}, function(){
this.resource("category", {path: "/:name"}, function(){
this.route("featured", {path:"/featured"})
this.route("popular", {path:"/popular"})
});
})
})
App.CategoryIndexRoute = Ember.Route.extend({
model: function(params) {
console.log(params)
return App.Category.find({category_name: params.name})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment