Initialize application in Ember.next, fixes auth
This commit is contained in:
parent
24d98eb66a
commit
404dde1cdf
|
@ -37,16 +37,17 @@ require 'ext/ember/namespace'
|
||||||
run: (attrs) ->
|
run: (attrs) ->
|
||||||
location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!'
|
location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!'
|
||||||
|
|
||||||
app = Travis.App.create(attrs || {})
|
Ember.run.next this, ->
|
||||||
# TODO: router expects the classes for controllers on main namespace, so
|
app = Travis.App.create(attrs || {})
|
||||||
# if we want to keep app at Travis.app, we need to copy that, it would
|
# TODO: router expects the classes for controllers on main namespace, so
|
||||||
# be ideal to send a patch to ember and get rid of this
|
# if we want to keep app at Travis.app, we need to copy that, it would
|
||||||
$.each Travis, (key, value) ->
|
# be ideal to send a patch to ember and get rid of this
|
||||||
app[key] = value if value && value.isClass && key != 'constructor'
|
$.each Travis, (key, value) ->
|
||||||
|
app[key] = value if value && value.isClass && key != 'constructor'
|
||||||
|
|
||||||
@app = app
|
@app = app
|
||||||
@store = app.store
|
@store = app.store
|
||||||
$ => app.initialize()
|
$ => app.initialize()
|
||||||
|
|
||||||
require 'travis/ajax'
|
require 'travis/ajax'
|
||||||
require 'app'
|
require 'app'
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
bb4e051b
|
19b5fc63
|
Loading…
Reference in New Issue
Block a user