mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 12:42:40 +08:00
DEV: reduces memory footprint of tests - step 1 (#7591)
This commit is contained in:
@ -5,10 +5,14 @@ const MAX_FIELDS = 20;
|
||||
export default Ember.Controller.extend({
|
||||
fieldTypes: null,
|
||||
createDisabled: Ember.computed.gte("model.length", MAX_FIELDS),
|
||||
|
||||
fieldSortOrder: ["position"],
|
||||
sortedFields: Ember.computed.sort("model", "fieldSortOrder"),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.fieldSortOrder = ["position"];
|
||||
},
|
||||
|
||||
actions: {
|
||||
createField() {
|
||||
const f = this.store.createRecord("user-field", {
|
||||
|
Reference in New Issue
Block a user