dburles / meteor-collection-helpers

⚙️ Meteor package that allows you to define helpers on your collections
https://atmospherejs.com/dburles/collection-helpers
MIT License
498 stars 33 forks source link

Meteor helpers with fetch #74

Closed jdnichollsc closed 7 years ago

jdnichollsc commented 7 years ago

Hi guys,

Thanks for this project! One question, exist any example using fetch? For example

var myArray = myCollection.find({}).fetch();
myArray[0].myHelperProperty(); //Doesn't exist...

Thanks in advance, Nicholls

dburles commented 7 years ago

Hey @jdnichollsc that should work just fine, the most likely cause is that the helpers haven't been applied to the collection that you're querying. Perhaps you defined them only on the server (or client).

jdnichollsc commented 7 years ago

Hi man, thanks for your quickly response! Exist any example? I'm using publications in the server side.

Regards, Nicholls

dburles commented 7 years ago

What I mean is that you'll want to be sure that you have defined your helpers where you are expecting to use them. Can you provide a link to a repo with a very simple reproduction of your issue?

jdnichollsc commented 7 years ago

Sorry @dburles, this project works like a charm! 🥇