Need help accessing full collection in yogiben:admin


#1

I have a collection called Academics, and each academic can have up to two advisors, who are also academics (a self-join). Everything is working fine, except that I am using the yogiben:admin plugin & want to use it to administrate the academic-advisor relationship.

However, when I go into a single academic to edit it in the admin panel, the only academic that shows up in the advisor dropdown is the one I’m editing (and in mongol, the only academic doc I can see is the individual who is being edited). How do I gain access to the full collection while editing an individual doc in the yogiben:admin panel?

Here is the relevent part of the Schema for Academics, if it helps:

Schemas.Academics = new SimpleSchema

    // other fields that work just fine are here...

    advisor1:
        type: Object
        optional: true

    'advisor1.who':
        type: String
        regEx: SimpleSchema.RegEx.Id
        optional: true
        autoform:
            options: ->
                _.map(Academics.find({}).fetch(), (academics)->
                    label: academics.name
                    value: academics._id
                )

Note: I’ve asked this question on stackoverflow, but received no response, so I figured I’d ask here.


#2

How do you publish/subscribe your collection Academics?


#3

That’s it! I using meteorhacks:sub-manager, and so everything is subscribed to in the route. I put a subscription in my client file & the admin panel picked it right up. Thank you!