themeteorchef / base

A starting point for Meteor apps.
http://themeteorchef.com/base
MIT License
690 stars 253 forks source link

Add collection-helpers? #175

Open dburles opened 8 years ago

dburles commented 8 years ago

Seems like it would make sense! :)

zeroasterisk commented 8 years ago

I use both collection hooks and collection helpers, and have a hard time thinking about not having them....

themeteorchef commented 8 years ago

Not against this! Is there a specific implementation pattern you have in mind @dburles or just having support from scratch?

dburles commented 8 years ago

Hmm, say the Documents collection example is updated to include firstName and lastName fields you could then write something like this as an example:

Documents.helpers({
  fullName() {
    return `${this.firstName} ${this.lastName}`;
  },
});

Otherwise I think it would make sense to just add support from scratch with the example listed in the documentation.