<commit_before>Todos.Router.map(function() {
    this.resource('todos', { path: '/' }, function() {
        this.route('active');
        this.route('completed');
    });
});

Todos.TodosRoute = Ember.Route.extend({
    model: function() {
        return this.store.find('todo');
    }
});

Todos.TodosIndexRoute = Ember.Route.extend({
    model: function() {
        return this.modelFor('todos');
    }
});

Todos.TodosActiveRoute = Ember.Route.extend({
    model: function () {
        return this.store.filter('todo', function(todo) {
            return !todo.get('isCompleted');
        });
    },
    renderTemplate: function(controller) {
        this.render('todos/index', {controller: controller});
    }
});

Todos.TodosCompletedRoute = Ember.Route.extend({
    model: function () {
        return this.store.filter('todo', function(todo) {
            return todo.get('isCompleted');
        });
    },
    renderTemplate: function(controller) {
        this.render('todos/index', {controller: controller});
    }
});<commit_msg>route refactoring. Man, do I love javascript.<commit_after>Todos.Router.map(function() {
    this.resource('todos', { path: '/' }, function() {
        this.route('active');
        this.route('completed');
    });
});

Todos.TodosRoute = Ember.Route.extend({
    model: function() {
        return this.store.find('todo');
    }
});

Todos.TodosIndexRoute = Ember.Route.extend({
    model: function() {
        return this.modelFor('todos');
    }
});

Todos.TodosBaseFilterRoute = Ember.Route.extend({
   model: function () {
        return this.store.filter('todo', this.getFilteredList);
    },
    renderTemplate: function(controller) {
        this.render('todos/index', {controller: controller});
    } 
});

Todos.TodosActiveRoute = Todos.TodosBaseFilterRoute.extend({
    getFilteredList: function(todo) {
        return !todo.get('isCompleted');
    }
});

Todos.TodosCompletedRoute = Todos.TodosBaseFilterRoute.extend({
    getFilteredList: function(todo) {
        return todo.get('isCompleted');
    }
});

{'fraction_non_alphanumeric': 0.1694997571636717, 'fraction_numerical': 0.0, 'mean_word_length': 3.0392156862745097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3161090', 'n_tokens_mistral': 678, 'n_tokens_neox': 673, 'n_words': 94}