Files
mozo-backend/app/assets/javascripts/supplier/app/routes/index_route.js.coffee
T

23 lines
1.2 KiB
CoffeeScript

# App.IndexRoute = Ember.Route.extend
# model: (params, queryParams)->
# Ember.Object.create
# # Find with condition does not work since the resulting array promise is not updated for newly created records
# #lists: App.List.find({state: 'active'})
# #orders: App.Order.find({state: 'active'})
# #lists: @store.filter 'list', (l)-> l.get('state') == 'active' # DOES NOT WORK!!!! (yet)
# # use filter to create a scope on all the records
# #lists: @store.filter 'list', -> true
# lists: @store.all 'list'
# # mayby @store.all 'list' will work better!!!! (2014-04-24 a more experienced benjamin :)
# #orders: @store.filter 'order', -> true
# orders: @store.all 'order'
# sections: @store.all 'section'
# setupController: (controller, model)->
# controller.set('model', model)
# #$('#section_selector').on 'change', (-> controller.set('sectionId', $(this).val()))
# #controller.set 'lists', @store.all('list')
# #controller.set 'lists', App.List.all() #.filterProperty('state', 'active')
# #controller.set 'orders', App.Order.all()
# #controller.set 'lists', model.get('lists')
# #controller.set 'orders', model.get('orders')