DEV: migrate routes to the new @action pattern (#149)
This commit is contained in:
parent
b8763be6d6
commit
58cfe737f7
|
@ -1,5 +1,6 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
controllerName: "group-reports-index",
|
controllerName: "group-reports-index",
|
||||||
|
@ -29,10 +30,9 @@ export default DiscourseRoute.extend({
|
||||||
controller.setProperties(model);
|
controller.setProperties(model);
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
@action
|
||||||
refreshModel() {
|
refreshModel() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
controllerName: "group-reports-show",
|
controllerName: "group-reports-show",
|
||||||
|
@ -28,10 +29,9 @@ export default DiscourseRoute.extend({
|
||||||
controller.setProperties(model);
|
controller.setProperties(model);
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
@action
|
||||||
refreshModel() {
|
refreshModel() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue