foxnewsnetwork / autox

yet another personal ember addon
MIT License
0 stars 0 forks source link

add child and children route dsl functions #2

Closed foxnewsnetwork closed 8 years ago

foxnewsnetwork commented 8 years ago

Right now, I use model#collection, but that really should be split into child and children in the router dsl to better allow auto-route to determine how to handle defaults

foxnewsnetwork commented 8 years ago

in this same vein, roll DSL data into a service that way, their handling gets correctly managed by ember

foxnewsnetwork commented 8 years ago

done. Use in the router.js file like so:

Router.map ->
  {namespace, model,  collection, form, view, child, children} = DSL.import @
  model "appointment", ->
    children "import-batches", as: "batch", -> form "new"
    children "export-batches", as: "batch"