Update code for newest ember-model
This commit is contained in:
parent
408cce2d4f
commit
1594130ff3
|
@ -126,7 +126,7 @@ unless window.TravisApplication
|
|||
if reference && options.skipIfExists
|
||||
return
|
||||
|
||||
reference = type._referenceForId(hash.id)
|
||||
reference = type._getOrCreateReferenceForId(hash.id)
|
||||
if reference.record
|
||||
reference.record.merge(hash)
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@ Travis.FlashController = Ember.ArrayController.extend
|
|||
@set('flashes', Ember.A())
|
||||
|
||||
content: (->
|
||||
@get('unseenBroadcasts').concat(@get('flashes'))
|
||||
@get('unseenBroadcasts').concat(@get('flashes')).filter (o) -> !!o
|
||||
).property('unseenBroadcasts.length', 'flashes.length')
|
||||
|
||||
unseenBroadcasts: (->
|
||||
|
|
|
@ -86,10 +86,10 @@ Array.prototype.diff = (a) ->
|
|||
@loadTheRest(key)
|
||||
|
||||
isAttribute: (name) ->
|
||||
this.attributes.contains(name)
|
||||
this.constructor.getAttributes().contains(name)
|
||||
|
||||
isRelationship: (name) ->
|
||||
this.relationships.contains(name)
|
||||
this.constructor.getRelationships().contains(name)
|
||||
|
||||
loadTheRest: (key) ->
|
||||
# for some weird reason key comes changed to a string and for some weird reason it even is called with
|
||||
|
@ -145,7 +145,7 @@ Array.prototype.diff = (a) ->
|
|||
).property()
|
||||
|
||||
isRecordLoaded: (id) ->
|
||||
!!@_referenceForId(id).record
|
||||
!!@_getOrCreateReferenceForId(id).record
|
||||
|
||||
camelizeKeys: true
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user