Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

binding.js.coffee

View binding.js.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
LO.Controllers.ContactsController = Ember.ArrayProxy.extend
init: ->
@_super()
@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) ->
value.map (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
 
LO.get('radium_store').commit()
).observes('query')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.