Skip to content

Instantly share code, notes, and snippets.

@gordonbisnor
Created December 3, 2014 20:59
Show Gist options
  • Save gordonbisnor/8fcf3f478d4e9aba5f43 to your computer and use it in GitHub Desktop.
Save gordonbisnor/8fcf3f478d4e9aba5f43 to your computer and use it in GitHub Desktop.
Loading has many association for ember record
`import Ember from "ember"`
InvoicesInvoiceRoute = Ember.Route.extend
model: (invoice)->
@store.find "invoice", invoice.invoice_id
setupController: (controller,model) ->
controller.set 'model', model
controller.set 'entries', @store.find 'time_entry', q:
invoice_id_eq: model.get 'id'
`export default InvoicesInvoiceRoute`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment