FIX: Redirecting breaks the back button.
This commit is contained in:
parent
f281f6e026
commit
8772ba2f80
|
@ -10,6 +10,7 @@ export default {
|
||||||
app.DiscoveryCategoryController = DiscoverySortableController.extend();
|
app.DiscoveryCategoryController = DiscoverySortableController.extend();
|
||||||
app.DiscoveryParentCategoryController = DiscoverySortableController.extend();
|
app.DiscoveryParentCategoryController = DiscoverySortableController.extend();
|
||||||
app.DiscoveryCategoryNoneController = DiscoverySortableController.extend();
|
app.DiscoveryCategoryNoneController = DiscoverySortableController.extend();
|
||||||
|
app.DiscoveryCategoryWithIDController = DiscoverySortableController.extend();
|
||||||
|
|
||||||
app.DiscoveryCategoryRoute = buildCategoryRoute('latest');
|
app.DiscoveryCategoryRoute = buildCategoryRoute('latest');
|
||||||
app.DiscoveryParentCategoryRoute = buildCategoryRoute('latest');
|
app.DiscoveryParentCategoryRoute = buildCategoryRoute('latest');
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
import Category from 'discourse/models/category';
|
import Category from 'discourse/models/category';
|
||||||
|
|
||||||
export default Discourse.Route.extend({
|
export default Discourse.DiscoveryCategoryRoute.extend({
|
||||||
model: function(params) {
|
model(params) {
|
||||||
return Category.findById(params.id);
|
return { category: Category.findById(params.id) };
|
||||||
},
|
|
||||||
|
|
||||||
redirect: function(model) {
|
|
||||||
this.transitionTo(`/c/${Category.slugFor(model)}`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue