discourse/app/assets/javascripts/discourse/routes/topic_best_of_route.js
2013-03-26 15:40:30 -04:00

24 lines
560 B
JavaScript

/**
This route is used when a topic's "best of" filter is applied
@class TopicBestOfRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.TopicBestOfRoute = Discourse.Route.extend({
setupController: function(controller, params) {
var topicController;
params = params || {};
params.trackVisit = true;
params.bestOf = true;
topicController = this.controllerFor('topic');
topicController.cancelFilter();
topicController.set('bestOf', true);
topicController.loadPosts(params);
}
});