Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
LO.Controllers.ContactsController = Ember.ArrayProxy.extend
init: ->
@set 'content', LO.get('backend_store').findAll LO.Models.Contact
@view = Ember.View.create
templateName: 'app/templates/contacts'
@view.appendTo 'body'
queryBinding: Ember.Binding.transform((value, binding) -> (item, index, self) ->
{name: item.firstName + ' ' + item.lastName}
).from 'LO.query_controller.content'
queryDidChange: ( ->
return unless @get('query').length > 0
query = @get 'query'
query.forEach (item) ->
LO.Models.Contact.createOrUpdate item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment