I am trying to create a report a post feature for my meteor app but I am having issues only displaying the name of the current post the user is in.
My report Schema looks as follows;
ReportsSchema = new SimpleSchema({
refrenceId: {
type: String,
label: "Article Name",
autoform: {
options: function () {
return Articles.find().map(function (p) {
return {label: p.title, value: p._id};
});
}
}
},
reason: {
type: String,
label: "Reason",
allowedValues: ['copyright', 'plagiarism', 'spam or misleading'],
autoform: {
options: function () {
return _.map(['copyright', 'plagiarism', 'spam or misleading'], function (c, i) {
return {label: "Report " + i + ": " + c, value: c};
});
}
}
}
});
This somewhat works but it creates a list of all the names when I only want the one I am currently in.
Any help would be appreciated.
meteor iron-router meteor-blaze met