prevent bug on categories new/edit with custom fields (load order with extended schema problem)

This commit is contained in:
xavcz 2016-10-06 12:16:59 +02:00
parent eb98fb0199
commit 09eaf71f38

View file

@ -1,3 +1,4 @@
import { Meteor } from 'meteor/meteor';
import Posts from "meteor/nova:posts";
import Users from 'meteor/nova:users';
import Categories from "./collection.js";
@ -28,7 +29,10 @@ Meteor.methods({
}
});
Categories.smartMethods({
createName: "categories.new",
editName: "categories.edit"
// assign smart methods on startup so the method code generated takes care of categories' custom fields (extended schema) -> prevent bug on create/edit categories with custom fields
Meteor.startup(() => {
Categories.smartMethods({
createName: "categories.new",
editName: "categories.edit"
});
});