Proper fix for last build link

It seems that when you use id in link, it will pass it directly to
connectOutlets. Need to instantiate object in such situation.
This commit is contained in:
Piotr Sarnacki 2012-09-28 17:39:40 +02:00
parent 3cf12e7a84
commit 8ffd466e9f
3 changed files with 5 additions and 2 deletions

View File

@ -172,6 +172,10 @@ Travis.Router = Ember.Router.extend
show: Ember.Route.extend
route: '/:build_id'
connectOutlets: (router, build) ->
unless build.get
# TODO: apparently when I use id in url, it will pass it
# here, why doesn't it use deserialize?
build = Travis.Build.find(build)
router.get('repositoryController').set 'build', build
router.get('repositoryController').activate 'build'

View File

@ -42,7 +42,6 @@
text = ''
ansi.forEach (part) ->
console.log(part)
classes = []
part.foreground and classes.push(part.foreground)
part.background and classes.push('bg-' + part.background)

File diff suppressed because one or more lines are too long