DEV: improves rails plugin generator (#7949)
Fixes bugs, simplifies code, more default files. General idea, more is more here as it's easier to just delete things than reading and passing all the options.
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import RestAdapter from "discourse/adapters/rest";
|
||||
|
||||
export default RestAdapter.extend({
|
||||
basePath() {
|
||||
return "/<%= dasherized_name %>/";
|
||||
}
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
}
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
}
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
export default Ember.Controller.extend({});
|
||||
@@ -0,0 +1,3 @@
|
||||
import RestModel from "discourse/models/rest";
|
||||
|
||||
export default RestModel.extend({});
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export default Discourse.Route.extend({
|
||||
controllerName: "actions-index",
|
||||
|
||||
model(params) {
|
||||
return this.store.findAll("action");
|
||||
},
|
||||
|
||||
renderTemplate() {
|
||||
this.render("actions-index");
|
||||
}
|
||||
});
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export default Discourse.Route.extend({
|
||||
controllerName: "actions-show",
|
||||
|
||||
model(params) {
|
||||
return this.store.find("action", params.id);
|
||||
},
|
||||
|
||||
renderTemplate() {
|
||||
this.render("actions-show");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
export default Discourse.Route.extend({
|
||||
controllerName: "actions",
|
||||
|
||||
renderTemplate() {
|
||||
this.render("actions");
|
||||
}
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
controller-index.hbs
|
||||
+1
@@ -0,0 +1 @@
|
||||
controller-show.hbs id: {{model.id}}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
controller.hbs
|
||||
|
||||
{{outlet}}
|
||||
Reference in New Issue
Block a user