Kpcc.Router.map(function() {
    this.resource('articles', { path: "/" });
    this.resource('article', { path: ":article_id" });
});


Kpcc.ArticlesRoute = Ember.Route.extend({
    model: function() {
        this.controllerFor('articles').loadMore()
        return Kpcc.Article.all();
    },

    activate: function() {
        Kpcc.AutoRefresh.start(this.controllerFor('articles'), 60);
        this._super.apply(this, arguments);
    },

    deactivate: function() {
        Kpcc.AutoRefresh.stop();
        this._super.apply(this, arguments);
    }
});

Kpcc.Router.map(function() {
    this.resource('articles', { path: "/" });
    this.resource('article', { path: ":article_id" });
});


Kpcc.ArticleRoute = Ember.Route.extend({
    model: function(params) {
        return Kpcc.Article.find(params.article_id);
    }
});


Kpcc.ArticlesRoute = Ember.Route.extend({
    model: function() {
        this.controllerFor('articles').loadMore()
        return Kpcc.Article.all();
    },

    activate: function() {
        Kpcc.AutoRefresh.start(this.controllerFor('articles'), 60);
        this._super.apply(this, arguments);
    },

    deactivate: function() {
        Kpcc.AutoRefresh.stop();
        this._super.apply(this, arguments);
    }
});

Add model hook for single Article route
Add model hook for single Article route

Fixes the problem where an article wouldn't load when directly accessed.
This can't be released until SCPRv4 is deployed with the url-safe obj
keys
