Remove unneeded code

This piece of code was used in order to load repos associated to jobs
when the latter were loaded from pusher. This was needed because jobs
events do not have repository record passed in pusher payload, so when
job was added with pusher and link to the job was displayed in "Running
Jobs" or in workers on right sidebar, Ember was loading missing repos.
We don't need this code anymore as there is no right sidebar.

Additionally after changes in Ember.js, it's possible to pass primitives
to linkTo. Previously the link to record needed to be constructed as
following:

    {{#linkTo "job" job.repo job}}Link to repo{{/linkTo}}

The drawback of such code is that repo would have been instantiated in
such case. Now, we can do something like this:

    {{#linkTo "job" job.repositorySlug job}}Link to repo{{/linkTo}}

so as long as we have information about repository slug in the job data,
such hacks are not be needed.
This commit is contained in:
Piotr Sarnacki 2013-08-05 13:14:58 +02:00
parent dcb2945092
commit d94816ec8f

View File

@ -20,14 +20,6 @@ require 'travis/model'
_config: Ember.attr('object', key: 'config') _config: Ember.attr('object', key: 'config')
repoSlugDidChange: (->
if slug = @get('repoSlug')
Travis.Repo.load([{
id: @get('repoId'),
slug: slug
}])
).observes('repoSlug')
log: ( -> log: ( ->
@set('isLogAccessed', true) @set('isLogAccessed', true)
Travis.Log.create(job: this) Travis.Log.create(job: this)