We are following the pattern of yogiben:meteor-starter, and defining our collections in the /collections directory. However, sometimes we are getting CollectionName is not defined in client code. Where should collections be defined so that they are always available in client/server code?
Two examples of when we are getting the CollectionName is not defined error are:
-
When calling the
CollectionNamefrom within/libor/both -
When calling the
CollectionNamefrom within/collections/hooks/