unable to add filter on a collection in Meteor helper -


i've got sort filter working, in helper, on collection shows "goals" ordered date. i'm trying add filter shows goals have status of 1.

/server/publications.js

meteor.publish("goals", function() {     return goals.find(); }); 

/client/main.js

meteor.subscribe("goals"); 

/client/views/goals_list.js

template.goalslist.helpers({     goals: function() {         return goals.find({}, {sort: {submitted: -1}}, {status: 1});     } }); 

the sort on submitted works fine, , continues working addition of status, still see goals, not ones status of 1.

i've tried this, , many more ideas:

return goals.find({}, {sort: {submitted: -1}}, {filter: {status: 1}}); 

any appreciated.

directives limit returned documents based on contents belong in selector argument find. in case:

return goals.find({status: 1}, {sort: {submitted: -1}}); 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -