
After upgrading ember to 1.8.1 tests pass, but I found a few cases where things break (for example when navigating between certain routes). I'm reverting for now. This reverts commitfa5e9179af
, reversing changes made to978c887123
.
20 lines
572 B
CoffeeScript
20 lines
572 B
CoffeeScript
delegate = (name, options) ->
|
|
options ||= options
|
|
->
|
|
target = @get(options.to)
|
|
target[name].apply(target, arguments)
|
|
|
|
Travis.CurrentUserController = Em.ObjectController.extend
|
|
sync: ->
|
|
@get('content').sync()
|
|
|
|
content: (->
|
|
@get('auth.currentUser')
|
|
).property('auth.currentUser')
|
|
|
|
syncingDidChange: (->
|
|
if (user = @get('content')) && user.get('isSyncing') && !user.get('syncedAt')
|
|
Ember.run.scheduleOnce 'routerTransitions', this, ->
|
|
@container.lookup('router:main').send('renderFirstSync')
|
|
).observes('isSyncing', 'content')
|