Skip to content

Instantly share code, notes, and snippets.

@Tim-Machine
Created August 14, 2015 00:17
Show Gist options
  • Select an option

  • Save Tim-Machine/19a3ba1da1afd4fc2e0f to your computer and use it in GitHub Desktop.

Select an option

Save Tim-Machine/19a3ba1da1afd4fc2e0f to your computer and use it in GitHub Desktop.
schema = new SimpleSchema
categoryIdId:
type: String
label: ''
optional: true
autoform:
type: 'select2'
options: ()->
cat = InventoryCategories.find().fetch()
final = new Array
_.each cat, (c)->
final.push value: c._id, label: c.name
final
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment