mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
prevent bug on categories new/edit with custom fields (load order with extended schema problem)
This commit is contained in:
parent
eb98fb0199
commit
09eaf71f38
1 changed files with 7 additions and 3 deletions
|
@ -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"
|
||||
});
|
||||
});
|
Loading…
Add table
Reference in a new issue