App.ApplicationRoute = Ember.Route.extend
  beforeModel: ->
    @supplier = @store.push
      data:
        id: supplier_object.id
        type: 'supplier'
        attributes: supplier_object
    @employee = @store.push
      data:
        id: employee_object.id
        type: 'employee'
        attributes: employee_object
    @supplier.reload().then =>
       #@store.find('list', state: 'active')
  setupController: (controller, model)->
    controller.set 'supplier', @supplier
    controller.set 'employee', @employee
    @controllerFor('product_categories').set 'model', @store.findAll('product_category')
